Interface DidYouMeanOptions

interface DidYouMeanOptions {
    automaticallyCorrectQuery?: boolean;
    queryCorrectionMode?: QueryCorrectionMode;
}

Properties

automaticallyCorrectQuery?: boolean

Whether to automatically apply corrections for queries that would otherwise return no results. When automaticallyCorrectQuery is true, the controller automatically triggers a new query using the suggested term. When automaticallyCorrectQuery is false, the controller returns the suggested term without triggering a new query.

The default value is true.

queryCorrectionMode?: QueryCorrectionMode

Define which query correction system to use

legacy: Query correction is powered by the legacy index system. This system relies on an algorithm using solely the index content to compute the suggested terms. next: Query correction is powered by a machine learning system, requiring a valid query suggestion model configured in your Coveo environment to function properly. This system relies on machine learning algorithms to compute the suggested terms.

Default value is next.