Skip to main content
This guide describes what to do when there are no results or when there’s no query. If results haven’t loaded, the search may still be in progress or the device may be offline. For more information, see No hits or is the search still in progress? If you want to feature content in your search results based on a set of conditions, you can use Algolia Rules to:
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 the ais-state-results widget.
Vue
This also works with 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 the ais-clear-refinements widget. To clear the query, add :excluded-attributes="[]".
Vue
You can also use 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.
Last modified on October 8, 2026