Slice Scroll: Limit maximum results for search result

I'm trying to use the Slice Scroll approach to parallel pull out a large volume of documents for a search. There does not appear to be a way to tell Elasticsearch to limit the results to the top X number of documents. The Slices appear to be for the entire results. This is due to the fact that the Size param is used to limit the batch size of the Scroll not the entire number of documents for search.

Is there something I'm missing about the Slice Scroll approach to limit the search results? Is there another technique to getting a large volume of documents in parallel out of Elasticsearch?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.