- Feature specific data from within your records to, for example, show promotional prices during a sales period
- Display advertisements or promotional banners.
To learn how to suppress InstantSearch’s initial ,
see Conditional requests.
Handle searches without results
When a query doesn’t return results, display a message and suggest changing the query or clearing filters.Display a message
To display a fallback message when a query doesn’t return results, use theais-state-results widget.
Vue
ais-infinite-hits.
To prevent undesirable, additional search requests,
see Show and hide widgets.
Let users reset filters and facets
If users apply an overly specific configuration, they may not find any results. Account for this by letting them reset filters from the “no results” display so they can start another search. Do this with theais-clear-refinements widget.
To clear the query, add :excluded-attributes="[]".
Vue
ais-current-refinements to show currently applied filters.
Vue
Handle empty queries
By default, InstantSearch sends search requests even when the query is empty. To hide results until users enter a query, use the following code. This hides the results without preventing search requests.Vue
Follow best practices for showing and hiding Vue InstantSearch widgets to prevent undesirable additional search requests.