<empty search> How to avoid/reduce them

I’m using vuejs with the following widgets:

  • ais-search-box
  • ais-hits
  • ais-pagination
  • ais-refinement-list

I’ve got the starter plan and only few days after using it (about 100 users right now), I’m already at 50% of the operations allowed within the cost of that plan.

Now I see the main search is “empty search”.

How can I avoid them so I can reduce the number of operations? Basically don’t mind starting with no result first until the user select a filter in the refinement list and/or type a query in the search box.

Or is there any way to reduce the number of operations?

For the search box, I already debounce it to 400 ms so the query is launched only when the user finished typing.

Thank you.
Best regards,

Hello Sebastien!

You can start with an empty search by performing conditional requests with a proxy client. We have a full guide in our documentation on how to do this with Vue InstantSearch: https://www.algolia.com/doc/guides/building-search-ui/going-further/conditional-requests/vue/

By default, InstantSearch tries to refine when it mounts, by performing a query with the search client. With a proxy client, you can check whether the query is empty or not before sending an API call.

This should drastically reduce your number of search operations, since you won’t trigger a search every time someone loads your search experience. You can combine this with the debounce that you’ve already put in place, which is a good way of mitigating how much search operations are triggered.