DidYouMeanActions

This is for:

Developer

The DidYouMean action creators.

Loader Function

loadDidYouMeanActions

Loads the debug reducer and returns possible action creators.

Parameters

  • engine: SearchEngine

    The headless engine.

Returns DidYouMeanActionCreators: The DidYouMean action creators.

DidYouMeanActionCreators

applyDidYouMeanCorrection

Applies a did-you-mean correction.

Parameters

  • correction: string

    The target correction (e.g., "corrected string").

Returns PayloadAction<string>: A dispatchable action.

disableAutomaticQueryCorrection

Disables automatic query correction

Returns PayloadAction: A dispatchable action.

disableDidYouMean

Disables did-you-mean.

Returns PayloadAction: A dispatchable action.

enableAutomaticQueryCorrection

Enables automatic query correction

Returns PayloadAction: A dispatchable action.

enableDidYouMean

Enables did-you-mean.

Returns PayloadAction: A dispatchable action.

setCorrectionMode

Sets the query correction mode.

Parameters

  • mode: CorrectionMode

    The query correction mode to use. Must be either "legacy" (index based) or "next" (query suggestions based).

Returns PayloadAction<CorrectionMode>: A dispatchable action.