When a user needs to get all instances of a field matching /cars/123
, I use search for retrieving the results with a maximum result of 10,000. I can see the number of hits easily exceeding ten thousand, so I've started looking into scroll
. However, https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html mentions the following:
Scrolling is not intended for real time user requests, but rather for processing large amounts of data, e.g. in order to reindex the contents of one index into a new index with a different configuration.
If scrolling isn't recommended for user requests, then what should I use for get all the results? Is there another way to query without limiting the maximum number of results returned?