QuerySuggestActions (Search Engine)

This is for:

Developer

The query suggest action creators.

Loader Function

loadQuerySuggestActions

Loads the querySuggest reducer and returns possible action creators.

Parameters

  • engine: SearchEngine

    The headless engine.

Returns QuerySuggestActionCreators: The query suggest action creators.

QuerySuggestActionCreators

clearQuerySuggest

Clears the current partial basic query expression and the list of query suggestions in a specific query suggest entity.

Parameters

Returns PayloadAction<ClearQuerySuggestActionCreatorPayload>: A dispatchable action.

fetchQuerySuggestions

Fetches a list of query suggestions for a specific query suggest entity according to the current headless state.

Parameters

Returns AsyncThunkAction<FetchQuerySuggestionsThunkReturn, FetchQuerySuggestionsActionCreatorPayload, AsyncThunkSearchOptions<StateNeededByQuerySuggest>>: A dispatchable action.

registerQuerySuggest

Registers a new query suggest entity to the headless state to enable the Coveo ML query suggestions feature.

Parameters

Returns PayloadAction<RegisterQuerySuggestActionCreatorPayload>: A dispatchable action.

selectQuerySuggestion

Selects a suggestion provided through a specific query suggest entity.

Parameters

Returns PayloadAction<SelectQuerySuggestionActionCreatorPayload>: A dispatchable action.

ClearQuerySuggestActionCreatorPayload

Properties

  • id: string

    The unique identifier of the target query suggest entity (e.g., b953ab2e-022b-4de4-903f-68b2c0682942).

FetchQuerySuggestionsActionCreatorPayload

Properties

  • id: string

    The unique identifier of the target query suggest entity (e.g., b953ab2e-022b-4de4-903f-68b2c0682942).

RegisterQuerySuggestActionCreatorPayload

Properties

  • id: string

    A unique identifier for the new query suggest entity (e.g., b953ab2e-022b-4de4-903f-68b2c0682942).

  • count?: number

    The number of query suggestions to request from Coveo ML (e.g., 3).

    Default: 5.

SelectQuerySuggestionActionCreatorPayload

Properties

  • expression: string

    The selected query suggestion (e.g., coveo).

  • id: string

    The unique identifier of the target query suggest entity (e.g., b953ab2e-022b-4de4-903f-68b2c0682942).