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 we do an extra manual highlighting in order 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 "Query Pipeline Stages" section click the button Add New Query Stage.

  3. In the modal window that appears do the following:
    1. From the drop-down list select "Query Scripting Processor".
    2. In the Namefield enter a name for this pipeline stage.
    3. In the Scriptsection 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 Elastic search engine.