Go to Develop > Query Rules Tab.

Now, Create a New Query Rule, and select the match_all  operator to create a rule that matches when no search query is applied.

Now that you have the query rule set, you can configure the results to be promoted or hidden.

You can also add a manual promotion (i.e. any JSON object that may not be part of your search app)

That's all! Next time when users query for data without a query set, they'll receive the promoted results that you've set in a promoted  key.

An example query to illustrate this below:

GET /my-app/search -d '{"query": {"match_all": {}}}'

Note: The Query DSL could've been anything. Query terms are tracked using the X-Search-Query  request header's value. As long as that header isn't passed, the match_all  query rule will be matched and the corresponding promoted items will be returned back in the response. (ReactiveSearch, Searchbox and other appbase.io libraries handle this out of the box for you)

The response for the above request will contain a promoted key containing the two additional results.

Did this answer your question?