q is empty or missing. Instead of returning no results, Meilisearch returns documents from the index, respecting all other search parameters such as filters, sorting, and facets.
This is useful when you want to display default content on a landing page, show trending items, or let users browse results before they start typing.
How it works
When Meilisearch receives a search request with an empty query, it skips the text-matching phase entirely. Documents are returned in the order determined by the active ranking rules, with custom ranking rules and thesort parameter playing the most significant role.
Since no query terms are involved, text-based ranking rules like words, typo, proximity, and exactness have no effect. Only sort and custom ranking rules influence the order of results.
Basic example
Send a search request with an empty query string:movies index in the default order.
Placeholder search with filters and sorting
Placeholder search becomes more powerful when combined with filters and sorting. For example, you can show the highest-rated movies in a specific genre:Placeholder search with facets
You can also request facet distributions alongside a placeholder search to build category navigation:facetDistribution object showing the count of documents for each facet value.
Common use cases
- Landing pages: Show popular or recent items when a user first visits your search page
- Category browsing: Combine an empty query with filters to let users explore content by category
- Default recommendations: Sort by a custom ranking attribute like
popularityto surface trending content - Faceted navigation: Display facet counts to help users narrow down results before searching
Pagination
Placeholder search supports the same pagination parameters as regular search. Useoffset and limit (or page and hitsPerPage) to paginate through results:
For a complete list of search parameters, see the search API reference.