Query Correction Feature

The Coveo Cloud index includes the automatic query correction or Did You Mean feature used to detect and automatically suggest or correct misspelled keywords (see Misspelled Words). This article describes in more detail how this feature works so that you can better understand what it can and cannot do.


  • The query correction is based on a word corrector lexicon (WCL) that contains frequent words and their number of occurrences gathered when items are indexed, so the spelling suggestions/corrections are based on the index content, not on predefined or custom dictionaries.

  • The query correction suggestions/corrections improve as the size of the index increases.

  • The query correction is done on a word by word basis, so the correction of a word is not modified by other words in the query.

  • The suggested spelling of a query word is determined based on both the frequency of the alternative words in the lexicon (the higher the better) and their degree of similarity with the original word (the closer the better). Thus, with two alternative spellings having the same edit distance, the word that is more frequent in the index is suggested.

  • An indexed word is not suggested by the word corrector lexicon if the word meets one or more of the following rejection rules:

    These word rejection rules are all active by default, but they can be turned off independently to fine tune the query correction behavior. Contact Coveo Support for help if you want to do that.

    • Containing more than 4 numbers.

    • Containing 7 or more consecutive consonants

    • Containing 6 or more consecutive vowels

    • Containing an invalid number of consecutive vowels considering the item language.

      The rule applies only to the following languages: English, French, Spanish, and German.


  • Your Coveo JavaScript Search interface must contain the DidYouMean component to include query correction suggestions.

  • The index must have a minimum size of 2,000 items to start providing query correction suggestions.

  • The query correction algorithm is triggered when the query returns a low number of results relative to the size of the index.


  • Suggestions are not provided if the query has been expanded by the thesaurus.

    The query correction and the thesaurus are independent features (see Thesaurus Leading Practices).

  • The Did You Mean feature will return no corrections when the query is processed by an Automatic Relevance Tuning (ART) model whose Intelligent Term Detection (ITD) feature is enabled.

  • The first letter of the misspelled keyword must be correct.

  • The algorithm is not applied to search terms meeting one or more of the following rules:

    • Containing 3 characters or less

    • Containing a wildcard character (* and ?)

    • Beginning with a number