I'm running filters (so I do not care for scoring or sorting at all), and I would like to get all the results as fast as possible. The results are varied from a few to tens of thousands.
ElasticSearch does not provide an option to get all the results using the Search API, and setting a large size of results affects the query duration.
What is the best approach (performance wise) to deal with this problem?
Should I always use the Scroll API? Should I always use the Search API with size = 10K (for example) and then use paging to retrieve all other results, if any? Should I first use the Count API and then decide?
Does the Scroll API incur any substantial overhead in comparison to multiple queries?