How to Customize Hit Highlighting

To keep all the text value for highlighting properties requested, an extra manual hit highlighting processing is done.

  • For example: We have a multi-value property from Elastic Search Engine: 
    PropertyName: PropertyValue;PropertyValue2 Test;

  • If you search for "Test", Elastic returns only "PropertyValue2Test".

  • In this case an extra manual highlighting is performed to return "PropertyValue;PropertyValue2Test;".

This extra manual highlighting processing can be disabled using a Query Script Processing stage.

How to Disable Manual Highlighting Processing

  1. Navigate to the ADMINISTRATION page of SmartHub.
  2. From the "User Experience Tuning " section, under Query Tuning, click the button ADD QUERY TUNING.
  3. In the modal window that appears do the following:
    1. From the drop-down list select "Query Scripting Processor".
    2. In the Name field enter a name for this Tuning stage.
    3. In the Script section enter your script.

      1. Query.SkipManualHighlighting = true;
    4. Click the Compile button to make sure that you don't have any errors.

    5. Click Save.

Note: Manual highlighting is supported only by the Elasticsearch search engine.

 
Note: The Query Scripting Tuning stage for Manual highlighting processing must be added at the Global Tuning stage level!