Adds a callback that's invoked on state change.
A callback that's invoked on state change.
A function to remove the listener.
Update 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.
the query correction mode to use
The
DidYouMean
controller is responsible for handling query corrections.Example: did-you-mean.fn.tsx