I want to implement autocomplete in my flutter app, but this would require sending algolia search requests every time the text field changes. Wouldn’t this eat up my units very quickly if it’s 1000 requests/unit?
Traditionally, autocomplete experiences are as-you-type, meaning it refreshes for every query. In an Algolia context, it means indeed that every keystroke sends a new request to Algolia, counting towards your search requests. So, when typing “apple”, you get five search requests: “a”, “ap”, “app”, “appl” and “apple”.
Now, depending on the number of users you have and your Algolia plan, you may decide that as-you-type consumes too many units too quickly. In this case, you can debounce your search.
Were you initially referring to our Autocomplete library? If yes, you can debounce source execution to avoid querying Algolia at each keystroke. You no longer get the immediacy you have with as-you-type, but with a reasonable number, the experience remains pleasant and you control your unit consumption better.