--- title: Query correction feature slug: '1810' canonical_url: https://docs.coveo.com/en/1810/ collection: searching-with-coveo source_format: adoc --- # Query correction feature Coveo supports a [query](https://docs.coveo.com/en/231/) correction feature (also known as _Did You Mean_). This feature can suggest substitutes for, or even automatically correct, misspelled [keywords](https://docs.coveo.com/en/2738/). It also provides suggestions for properly spelled [keywords](https://docs.coveo.com/en/2738/). The [query](https://docs.coveo.com/en/231/) correction feature will first try to use an [index](https://docs.coveo.com/en/204/)-based system to provide potential corrections. If the [index](https://docs.coveo.com/en/204/)-based system can't provide any corrections, a second fallback system based on a [Coveo Machine Learning (Coveo ML)](https://docs.coveo.com/en/188/) [Query Suggestion (QS)](https://docs.coveo.com/en/1015/) [model](https://docs.coveo.com/en/1012/) will be used. As such, you should make sure that your [QS](https://docs.coveo.com/en/1015/) [model](https://docs.coveo.com/en/1012/) is [correctly configured](https://docs.coveo.com/en/3398/). ## Example A user is trying to find a specific movie (`Ex Machina`) on your theater's search page. They send a [query](https://docs.coveo.com/en/231/) with the misspelled [keywords](https://docs.coveo.com/en/2738/) `Ex Manchia`. * **If the [query](https://docs.coveo.com/en/231/) doesn't return any results:** The [query](https://docs.coveo.com/en/231/) correction feature automatically corrects the [keywords](https://docs.coveo.com/en/2738/) to `Ex Machina`, because `Ex Machina` is similar, and triggers a new [query](https://docs.coveo.com/en/231/) using the new [keywords](https://docs.coveo.com/en/2738/). ![Query correction replaces the misspelled keywords](https://docs.coveo.com/en/assets/images/coveo-platform/query-correction-replace.png) * **If the [query](https://docs.coveo.com/en/231/) only returns a few results:** The [query](https://docs.coveo.com/en/231/) correction feature displays the results but suggests the [keywords](https://docs.coveo.com/en/2738/) `Ex Machina` to the user. ![Query correction suggests keywords with more results](https://docs.coveo.com/en/assets/images/coveo-platform/query-correction-suggestion.png) ## About the query correction systems You won't have to choose between the [index](https://docs.coveo.com/en/204/)-based and [QS](https://docs.coveo.com/en/1015/)-based [query](https://docs.coveo.com/en/231/) correction systems. Both have specific features and limitations, and they work together to provide the best possible corrections in most situations. > **Note** > > Generally, the [query](https://docs.coveo.com/en/231/) correction feature doesn't correct [queries](https://docs.coveo.com/en/231/) that were processed by a [Coveo ML](https://docs.coveo.com/en/188/) [Automatic Relevance Tuning (ART)](https://docs.coveo.com/en/1013/) [model](https://docs.coveo.com/en/1012/) for which the [Intelligent Term Detection (ITD)](https://docs.coveo.com/en/207/) feature is enabled. > In rare cases, however, the query correction feature may process these [queries](https://docs.coveo.com/en/231/). ### Features of the index-based system * Corrections are based explicitly on the [index](https://docs.coveo.com/en/204/) corpus, as opposed to user signals which are captured through analytics signals. * A correction will only be proposed if its occurrences in the [index](https://docs.coveo.com/en/204/) corpus are an order of magnitude more prevalent than the original word. ### Limitations of the index-based system This system will ignore [keywords](https://docs.coveo.com/en/2738/) that: * Are less than four characters long * Occur less than five times in the [index](https://docs.coveo.com/en/204/) * Contain more than four digits * Begin with a digit * Contain seven or more consecutive consonants * Contain six or more consecutive vowels * Contain an invalid number of consecutive vowels, considering the [item](https://docs.coveo.com/en/210/) language * Contain [wildcard expressions](https://docs.coveo.com/en/1580/) ### Features of the QS-based system * This system only considers [queries](https://docs.coveo.com/en/231/) which resulted in clicks on search results a [specific number of times](https://docs.coveo.com/en/2010/). * Its suggestions are based on the [query](https://docs.coveo.com/en/231/) performance of a potential correction, captured through [Coveo Analytics metrics](https://docs.coveo.com/en/263/). * It considers the degree to which the potential correction matches the typed characters. ### Limitations of the QS-based system * This system requires a [correctly configured QS model](https://docs.coveo.com/en/3398/). ## Prerequisite A correctly configured [QS](https://docs.coveo.com/en/1015/) [model](https://docs.coveo.com/en/1012/) must be configured and available in your [Coveo organization](https://docs.coveo.com/en/185/). This [model](https://docs.coveo.com/en/1012/) will be used to propose the best available correction to users. ## Configure the feature Depending on the Coveo technology that you use to build your search interfaces, see: * [Coveo Atomic](https://static.cloud.coveo.com/atomic/v3/storybook/index.html?path=/docs/atomic-did-you-mean\--docs) * [Coveo Headless](https://docs.coveo.com/en/headless/latest/reference/interfaces/Search.DidYouMean.html) * [Coveo Quantic](https://docs.coveo.com/en/quantic/latest/reference/search-components/search-did-you-mean/) If you're leveraging the Coveo Search API directly, you can use the [`queryCorrection`](https://docs.coveo.com/en/13#operation/searchUsingPost-queryCorrection) parameter to enable and control the [query](https://docs.coveo.com/en/231/) correction feature.