THIS IS ARCHIVED DOCUMENTATION

SearchActions (Deprecated)

The search action creators.

Loader Function

loadSearchActions

Loads the search reducer and returns possible action creators.

Parameters

  • engine: SearchEngine

    The headless engine.

Returns SearchActionCreators: The search action creators.

SearchActionCreators

executeSearch

Creates an action that executes a search query.

Parameters

  • analyticsSearchAction: SearchAction

    The analytics action to log after a successful query. See loadSearchAnalyticsActions for possible values.

Returns AsyncThunkAction<ExecuteSearchThunkReturn, SearchAction, AsyncThunkOptions<StateNeededByExecuteSearch, ClientThunkExtraArguments<SearchAPIClient]>: A dispatchable action.

fetchFacetValues

Creates an action that only fetches facet values without affecting the rest of the state.

Parameters

  • analyticsSearchAction: SearchAction

    The analytics action to log after a successful query. See loadSearchAnalyticsActions for possible values.

Returns AsyncThunkAction<ExecuteSearchThunkReturn, SearchAction, AsyncThunkOptions<StateNeededByExecuteSearch, ClientThunkExtraArguments<SearchAPIClient]>: A dispatchable action.

fetchMoreResults

Creates an action that fetches more results.

Returns AsyncThunkAction<ExecuteSearchThunkReturn, void, AsyncThunkOptions<StateNeededByExecuteSearch, ClientThunkExtraArguments<SearchAPIClient]>: A dispatchable action.