Configure the Highlight Query Pipeline Stage

The Highlight stage allows you to highlight key parts of fields by generating snippets and appending match tags to the highlighted terms. The highlight match tags can then be styled in your web search application.

How does this differ from other highlight methods?

Instructions

  1. Navigate to Querying > Query Workbench.

  2. Click Add a Stage and choose Highlight from the list.

  3. Click the + Highlight Fields button, and input the field name(s) to configure highlighting for. Repeat to enter multiple fields, if desired.

  4. Assign a Snippet count value. With a value of 3, Fusion will attempt to generate 3 snippets containing highlighted terms.

  5. Assign a Snippet length value. With a value of 100, Fusion will attempt to create snippets that are around 100 characters in length.

  6. Assign Match tag values. These values are used to wrap the highlighted terms. By default, <em> and </em> are used. You can use other values for the match tags, such as <span style="background-color:powderblue;"> and </span>, but the Fusion UI will not reflect your custom styles.

  7. (optional) Set Default highlight to true if you want to generate snippets even when no highlights are found. The Snippet count and Snippet length values are still in effect.

  8. Click the Apply button to preview highlighting.

    Important

    To see highlighting in the Query Workbench, turn it on by setting Format Results > Display highlighting? to true:

    Display highlighting option

  9. If you are satisfied with your changes, click the Save button to save the pipeline.