Query Workbench

The Query Workbench is where you edit query pipeline stages, results parameters, and more, then preview the impacts of the changes in real time before saving them. Relevancy tools such as boosting and blocking are accessible the Query Workbench and can be altered directly from the Workbench. The Query Workbench streamlines the process of querying indexed results and fine-tuning Query Pipelines to surface the results that best satisfy the end user’s needs.

See the Query Language Cheat Sheet for help constructing queries.

Query Workbench

With this sandbox paradigm, you can experiment with query pipelines without consequence because Fusion uses a copy of a pipeline to simulate the new results, and it is not permanently modified in the collection until you click Save.

Query pipelines and pipeline stages

Query pipelines work by processing search requests and returning an ordered list of matching documents. Each pipeline consists of a series of query stages that can be added, ordered, and configured using the Query Workbench.

Select any stage in the pipeline to open its configuration panel:

Stage configuration panel

Adding a pipeline stage

Click Add a Stage to add query pipeline stages that can perform query setup, results relevancy, troubleshooting, and more.

Add a stage

The Solr Query stage is the only pipeline stage that is required for querying processes to complete, and therefore exists in every query pipeline. It is always the last stage in a series.

Re-ordering pipeline stages

The order of the pipeline stages matters, because the output from one stage becomes the input to the next stage. For example, the Solr Query stage must always come last in the sequence, so that data is indexed only after it has been processed by all other stages. Putting this stage first in the sequence means that subsequent stages have no effect on the indexed data.

Re-order stages

Drag any stage in the pipeline to move it up or down in the sequence of stages. The preview panel automatically updates the search results to reflect the output of the new sequence.

Enabling and disabling pipeline stages

By default, every stage in a query pipeline is enabled. While working with a query pipeline, it can be helpful to disable stages without removing them completely. This allows you to preserve a stage’s configuration while observing how the search results change in its absence. You can re-enable the stage at any time. When you save a query pipeline, the enabled/disabled state of each stage is also saved.

Enable/disable stages

Click the circle next to any stage in order to enable or disable it.

Boosting and blocking

As you search your data and inspect the results, you can manipulate the rankings of individual documents. Boosting a document raises its ranking, while blocking a document removes it from search results.

Boosting and blocking affects the results for specific queries. For example, when you search for "citizen" and boost the document for "Citizen Kane", your end users will see that title boosted to the top when they also search for "citizen", but not necessarily when they search for "kane".

The Query Workbench provides convenient buttons for instantly blocking or boosting the documents that you see in the preview panel. Clicking Boost automatically adds the Boost Documents stage to your query pipeline, with a boost rule that matches your query and the document you clicked. Likewise, clicking Block adds and configures the Block Documents stage.

To boost a document
  1. In the preview panel, hover over the document you want to boost.

    Boosting

  2. Click Boost.

    The preview panel automatically updates the rankings of the search results, and tags the differences:

    Boosted result

    Notice that the Boost Documents stage is now in our pipeline. You can click this stage to view the boost rules you’ve added. This is also where you can remove boost rules:

    Boost Documents stage

To block a document
  1. In the preview panel, hover over the document you want to block.

    Blocking

  2. Click Block

    The preview panel automatically updates the rankings of the search results, and tags the differences.

    Blocked result

    Notice that the Block Documents stage is now in our pipeline. You can click this stage to view the block rules you’ve added. This is also where you can remove block rules:

    Block Documents stage

Compare mode

Compare mode allows you to compare search results using two different query pipelines, or compare search results from the original query pipeline and the copy being modified in the Query Workbench.. On the right is the working pipeline, which you can edit. On the left is one of your saved pipelines.

To use compare mode
  1. Click Compare.

    Another preview panel opens. In this view, you can compare results from one query pipeline side by side with another query pipeline.

  2. In the left panel, select a pipeline to compare to your working pipeline.

    Now you can see how the search results differ between the two pipelines:

    Compare mode

Tip
When you click a document in one panel, the other panel automatically scrolls to the same document.

To exit compare mode, click the Close Close icon.

Editing parameters

The Query Workbench allows you to edit the search parameters. Click Parameters to display the current search parameters and the #dit parameters button:

Search parameters

Then, click Edit parameters to open the "Parameters and Values" window where you can add, modify, or remove search parameters:

Parameters and Values

Formatting the search results

Ultimately, your search application will format the search results that end users see. The Query Workbench provides some formatting options for the preview panel.

At the bottom of the screen, click Format Results to configure how results are displayed in the QWB:

Format results

These options only affect how the Query Workbench displays results; they have no effect on how your search application displays them.

Selecting the fields to display

While the Query Fields stage configures which fields are matched against incoming queries, the search application itself determines which fields to display in the search results. In this case, the Query Workbench is our search application.

For example, the search results below use the title_txt field as the document name and the _lw_data_source_s field as the document description:

Display fields

The _lw_data_source_s field is an internal field added by Fusion during ingest; our end users will not find it useful. To change it, select a different field from the drop-down list. In this example, we selected the year_ti_t field. The preview panel automatically updates, and now we see the year of release for each movie title in our search results:

Updated display fields

Configuring highlighting

Search results can be displayed with the search terms highlighted, by adding these Solr query parameters to the Additional Query Parameters stage of the query pipeline:

  • hl=true

  • hl.fl=*

By default, the Query Workbench ignores these parameters when rendering search results. To view highlighted search results in the preview panel of the Query Workbench, you must configure the parameters above and enable the Display highlighting option.

To enable highlighting in the preview panel
  1. Add the Additional Query Parameters stage to your query pipeline, or select it if it is already there.

  2. Under Parameters and Values, add the following query parameters and values:

    Highlighting params

  3. Click Apply.

    At this point, no highlighting appears in the preview panel.

  4. At the bottom of the window, click Format Results.

  5. Select Display highlighting.

    Highlighting option

  6. Click Save.

    Now our search results include highlighted search terms:

    Highlighted search terms

Step-by-step Query Workbench workflow

  1. Use the Index Workbench to set up datasource(s).

  2. Run a crawl on the data.

  3. Open the Query Workbench.

  4. Select a query pipeline to use or create a new, blank pipeline (the Default pipeline is created automatically and can be used as-is or with modification).

  5. Modify the pipeline stages and set the order in which the queries will run.

  6. Examine the live results in the Search panel.

  7. Modify any pertinent stage settings to fine tune your results.

  8. Click Save to commit the new settings to the pipeline

After a custom Query Pipeline configuration is saved, it becomes available throughout Fusion and can be re-used and modified.