---
updatedAt: 2026-09-28T14:15:45.000Z
agentTools:
  projectIndex: https://developer.searchblox.com/v10.2/llms.txt
---

# 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.

[block:code]
{
  "codes": [
    {
      "code": "titleSnippet: 100\ntitleFragments: 3\ncontextSnippet: 200\ncontextFragments: 3",
      "language": "yaml"
    }
  ]
}
[/block]

\##**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:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/53ffdbb-term_highlight_yes.png",
        "term_highlight_yes.png",
        1901,
        862,
        "#d9d8dc"
      ]
    }
  ]
}
[/block]

* In search results the search term will be highlighted as in the screenshot:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/4eea81e-newsearch.png",
        "newsearch.png",
        1808,
        509,
        "#f9f9fa"
      ]
    }
  ]
}
[/block]

* To disable highlighting select No, as in the screenshot:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/8e87890-term_highlight_no.png",
        "term_highlight_no.png",
        1915,
        850,
        "#d9d9dd"
      ]
    }
  ]
}
[/block]

* In search results the search term will not be highlighted as in the screenshot:

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/73a8a56-no_highlight.png",
        "no_highlight.png",
        1738,
        643,
        "#fafbfb"
      ]
    }
  ]
}
[/block]