Context and Highlighting

Configuring Size of Search Context and Title

  • In SearchBlox it is possible to configure the size of context and title in the search results and number of fragments.
  • Go to <SEARCHBLOX_INSTALLATION_PATH>\webapps\ROOT\WEB-INF\relevance.yml and give the size for description context and title as shown:
  • It is possible to increase or decrease the value as per one's requirement. Please make sure to restart after making changes to relevance.yml file.
  • The value for the Snippet has to be between 20 and 1000.
titleSnippet: 100
titleFragments: 3
contextSnippet: 200
contextFragments: 3

Highlighting in Search Results

  • SearchBlox offers hit highlighting, which highlights specific search results.
  • To enable, go to Dashboard>Collections>Search Settings, and select Yes for Hit Highlighting:
1901
  • In search results the search term will be highlighted as in the screenshot:
1808
  • To disable highlighting select No, as in the screenshot:
1915
  • In search results the search term will not be highlighted as in the screenshot:
1738

What’s Next