(Deprecated) QuerySuggestActions
(Deprecated) QuerySuggestActions
The query suggest action creators.
Loader Function
loadQuerySuggestActions
Parameters
-
engine:
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
-
payload:
ClearQuerySuggestActionCreatorPayload
The action creator payload.
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
-
payload:
FetchQuerySuggestionsActionCreatorPayload
The action creator payload.
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
-
payload:
RegisterQuerySuggestActionCreatorPayload
The action creator payload.
Returns PayloadAction<RegisterQuerySuggestActionCreatorPayload>
: A dispatchable action.
selectQuerySuggestion
Selects a suggestion provided through a specific query suggest entity.
Parameters
-
payload:
SelectQuerySuggestionActionCreatorPayload
The action creator payload.
Returns PayloadAction<SelectQuerySuggestionActionCreatorPayload>
: A dispatchable action.
Related Types
ClearQuerySuggestActionCreatorPayload
Properties
-
id:
string
The unique identifier of the target query suggest entity (for example,
b953ab2e-022b-4de4-903f-68b2c0682942
).
FetchQuerySuggestionsActionCreatorPayload
Properties
-
id:
string
The unique identifier of the target query suggest entity (for example,
b953ab2e-022b-4de4-903f-68b2c0682942
).
RegisterQuerySuggestActionCreatorPayload
Properties
-
id:
string
A unique identifier for the new query suggest entity (for example,
b953ab2e-022b-4de4-903f-68b2c0682942
). -
count?:
number
The number of query suggestions to request from Coveo ML (for example,
3
).Default:
5
. -
q?:
string
The partial basic query expression for which to request query suggestions (for example,
cov
).
SelectQuerySuggestionActionCreatorPayload
Properties
-
expression:
string
The selected query suggestion (for example,
coveo
). -
id:
string
The unique identifier of the target query suggest entity (for example,
b953ab2e-022b-4de4-903f-68b2c0682942
).