Almost half of the users who can’t find what they need on their first search will abandon a site immediately.
Search.io’s spelling correction is designed to help users find the results they are looking for from the first search, even if they have not spelled their query terms correctly.
Spelling correction is available on all plans. In this section, we will explain how spelling correction works, and how you can customize it.
Search.io builds a custom spelling model based on the words and phrases from a selection of fields stored in your records. This ensures that spelling correction works for custom terms, like brand names, that aren’t in a standard dictionary.
There are two scenarios where your spelling model is used to analyse user input and provide alternative word and phrase suggestions:
- 2.When a user submits their final search query spelling suggestions are also generated. Each is given a weight indicating how confident the system is that the spelling suggestion is a good alternative. The search is processed with the user’s final query and the spelling suggestions.
Spelling suggestions are determined on a combination of the following:
Word edit distance
Edit distance quantifies how dissimilar words are to one another by calculating the number of steps to transform one word into another. Words up to 4 characters have a 1 edit distance, whilst words with more than 4 characters have a 2 edit distance.
Examples of transformations that have one edit distance from the incorrect word to the correct word:
- bke -> bike - missing letter in a word
- boke -> bike - letter substitution
- Biike -> bike - letter deletion
- Bkie -> bike - has a letter swap
- handcream -> hand cream - word splitting
- book store -> bookstore - word combination
Examples of transformations that have two edit distance from the incorrect word to the correct word:
- vecile -> vehicle - missing letter and letter swap
- maintainance -> maintenance - letter substitution and letter deletion
Phrase edit distance
Spelling separately analyses your spelling model to make phrase suggestions. Phrase suggestions have a maximum edit distance of 2. The whole phrase must be found in the spelling model
Example of transformations:
- comput desk -> computer desk - 2 missing letters in a word
- compute dek -> computer desk - 1 missing letter in each word
- comput dek -> No phrase suggestion due to exceeding edit distance
Words and phrases must be found at least 5 times in your data before they are used as candidates for spelling suggestions.
Frequency is also used to help determine probability. For example if you have an ecommerce store that sells bicycles, and a customer enters the query 'clok". Your store sells a lot of bike locks but few bike clocks. As 'lock' is likely to have a higher frequency it will take priority over a spelling suggestion of 'clock'
Spelling will submit the top 5 phrase suggestions. If no phrase suggestions are found then the top 5 word suggestions will be submitted. These are submitted in addition to the users original query lowering the chance of returning zero results and frustrating the user. Following on from our previous example "chep head phones" could be submitted as:
chep head phones
cheap head phones