This Confluence instance is now read-only, please head over to the Algolia Confluence instance for the same more up-to-date information

See how the spelling model is working

This is a Query pipeline step

The Search.io spelling model is trained when records are added to the index and uses a probabilistic match to include likely close misspellings. Any spelling mistakes that are within an edit distance of two will likely be included in the result set.

If you are finding unexpected results for some queries, then it can be a good idea to how the spelling model is affecting the results. To do this we can add a simple step to the query pipeline.

First navigate to Relevance > Advanced and add the following to the YAML file:

- id: export-phrases

Be sure to add the step at the end of the file in the postSteps section

This is going to export the phrases used in the spelling model when a query is run.

Remaining in the relevance pipeline, open the preview and click on the Raw response. Now run a query and you will see the “phrases” populate with spell corrections. In our example we incorrectly spelled ‘Cardigan’ as ‘Cardigen’ and we can see the corrected phrase in the response:

Click save and now you can always see what the spelling model is up to!

Watch the full video below:

https://loom.com/share/52baa336fcbd471aa338109498a29f4d