Alpha
Alpha
Resets the query in the controller state and clears the filter suggestions.
Alpha
Returns the serialized search parameters for the current search query and specified filter suggestion.
For example, q=jeans&f-cat_color=Blue
.
In a typical scenario, this method should be called when the user selects a filter suggestion from a standalone search box. The returned string is then used to pass the correct URL query parametes or fragment when redirecting the browser to the search page.
When the user selects a filter suggestion from the main search box on the search page, use the select
method
instead.
The filter suggestion to serialize.
The serialized search parameters for the current search query and specified filter suggestion.
Alpha
Clears all facet values, selects the specified filter suggestion, updates the query, and executes a new search request.
In a typical scenario, this method should be called when the user selects a filter suggestion from the main search box on the search page.
When the user selects a filter suggestion from a standalone search box, use the getSearchParameters
method
instead.
The filter suggestion to select.
Alpha
Adds a callback that's invoked on state change.
A callback that's invoked on state change.
A function to remove the listener.
Alpha
Sets the query in the controller state to the specified value and requests filter suggestions based on the updated query.
For example, if this method is called with jeans
as an argument, it will request values from the controller's
field (e.g., ec_brand
) that would return results if selected when the search query is jeans
(such as
Calvin Klein
, Columbia
, and Nautica
).
The search query to use as context to request the category filter suggestions. In a typical scenario, this should set to the current value of the search box input.
The
FilterSuggestions
controller provides methods to request and interact with facet suggestions based on a specific field for a given search query.This controller relies on a Commerce API functionality that is not yet generally available. If you wish to use this feature in an implementation, please contact your Coveo representative.