SAS® Visual Investigator returns a "Highlighting snippets could not be generated for one or more of the searched objects..." pop-up error


When you use the Search feature in SAS Visual Investigator, the following pop-up error might occur: 

Highlighting snippets could not be generated for one or more of the searched objects. Please contact your application administrator for assistance

When this error occurs, the svi-sand service log contains the following message, and the search fails to return any results:

Highlighting snippets could not be generated for one or more of the searched objects. The default search field is too large for the default highlighter. Please set the \"fvh_default_highlighter\" option to \"true\" for the following entities: <YourEntityName>.

This issue occurs because OpenSearch contains a default limit of 1,000,000 for the number of text characters to be analyzed. Since highlighting for large texts might require a substantial amount of time and memory, this limit is set to protect against this large resource usage. For additional information, see Index settings - OpenSearch Documentation.

Resolution

Method 1: Reduce the Number of Fields from Free Text Searches

Note: If this method does not solve the problem or is not feasible, see the caution below and proceed with method 2.

  1. Log on to the Manage Investigate and Search user interface.
  2. Click Data Objects.
  3. Double click the entity with the problem.
  4. Click the Fields tab.
  5. Click the field that you want to modify.
  6. Select False on the Include in free text searches drop-down bar. 
    Screenshot of the Include in free text searches drop-down bar
  7. Click OK. Then, save the change.
  8. Repeat these steps for all entities with the problem.
  9. Re-index the respective entities.
  10. Confirm that the search is successful.

Method 2: Enable the fvh_default_highlighter Parameter in the JSON Files

Caution: This method could increase the index size of the updated entities. Fast Vector Highlighter (FVH) requires storing term vectors with positions and offsets, which increases index size. If storage is not sized for that growth, nodes can reach disk watermarks, leading to shard movement and even read-only indices at flood-stage, which can degrade cluster performance and/or block writes.

For additional information, see Highlight query matches - OpenSearch Documentation.

  1. Inspect the svi-sand services log to determine which entities have the problem.
  2. Use SAS Visual Investigator to export the configuration of one or more entities with the problem.
  3. Unpack the ZIP file.
  4. In the Options section of the sand configuration JSON file, add the "fvh_default_highlighter”: true parameter. Repeat this step for each entity with the problem.
    Screenshot of the the "fvh_default_highlighter”: true parameter.
  5. Re-pack the ZIP file.
  6. Import the updated ZIP file.
  7. Re-index the respective entities.
  8. Confirm that the search is successful.