Yes, it is possible to trigger a search only after a certain number of characters have been typed. By default a search is triggered after every keystroke. If you want to change the default behaviour you can intercept the search using the helper state.
For example, you can limit the search to only trigger once at least 3 characters have been typed:
function customFilters(helper) {
if (helper.state.query) {
const search_string = helper.state.query;
if (search_string.length < 3) {
return false;
}
helper.search();
}
}
You can see an example of this functionality here: https://codesandbox.io/s/limit-string-length-for-search-nbxbw?file=/src/app.js
Although this approach will reduce the number of search operations (and potentially the cost), it can also lead to users perceiving the delay as unwanted lag.