Skip to main content
The Spell Check query stage lets you configure threshold values to invoke a spell check function, such as Solr Spell Check, to return relevant spelling suggestions when queries contain misspellings or typing errors. This improves search relevance and minimizes zero search result experiences. After the stage is configured, you can test by entering misspelled search terms in Query Workbench, and reviewing the suggestions returned by the spell check function.

Prerequisites

You can set up a Spell Check stage for any query pipeline. However, you must choose whether spell check is dependent on results for a Solr Query stage or from a neural hybrid query stage.
Choose either Result Count Threshold or Cutoff margin (NHS) based on your pipeline setup described above. If you configure both in the same query pipeline, Result Count Threshold takes priority.

Add Spell Check to your query pipeline

To configure and test the Spell Check query stage, open your pipeline, and complete the following steps:
  1. Click Add a new pipeline stage, and select Spell Check from the list.
  2. Select the Result Count Threshold checkbox, then enter the minimum number of results the search terms must return to prevent triggering the spell check function. The values are 0-50. For example, if the value in Result Count Threshold is 50, and the user enters search terms where fewer than 50 results are returned, the Spell Check stage triggers the spell check function selected in the Query Suggestions Method field. The spell check function assumes the user entry is misspelled or typed incorrectly, so it searches for correctly spelled terms similar to the search terms entered. If it finds suggestions, they display in Query Workbench.
  3. In the Query Suggestions Method field, select the spell check function to trigger if the threshold values are not met. For example, a value of solr triggers the Solr Spell Checking function.
  4. Click Save.
  5. Drag and move the Spell Check stage in the list so it appears after the Solr Query stage.
Spell Check stage located correctly in the query pipeline
After the Spell Check stage is configured, test the spell check function by accessing Query Workbench.
  1. In Query Workbench, enter a misspelled term in the Search field.
  2. If the threshold for results is not met, verify the “Did you mean?” dropdown with suggestions related to the search terms display. For example, if you enter electroncs, the system displays “Did you mean?” electronics, electronic, electrodes, and so on. The results do not interfere with neural hybrid search semantic relevance.
    Spell Check stage suggestions
  3. Select one of the suggestions and verify appropriate results display in the results section. You can click show fields to view details for each result.
If you are happy with the changes to your pipeline, save the pipeline.
The Spell Check query stage also provides Prometheus metrics and insights that help your organization make data-driven adjustments to increase conversions.

Understand threshold behavior

The spell check function is not triggered until the defined Result Count Threshold is met. When the threshold is not met, the spell check function processes the query, but suggestions only appear if the function produces at least one suggestion.For example, if Result Count Threshold is configured as 50:
Docs returnedThreshold metNumber of suggestionsSpell check suggestions returned
75
50
250
255

Configuration

When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.