In Elasticsearch scan-and-scroll, is there a way to control both the batch size and limit the number of documents in the search?
问题 Using the Elasticsearch scan-and-scroll feature, is it possible to control both the size of the batches returned, as well as the limit on the number of matches? According to the Elasticsearch scan-and-scroll documentation: Although we specified a size of 1,000, we get back many more documents. When scanning, the size is applied to each shard, so you will get back a maximum of size * number_of_primary_shards documents in each batch. This seems to indicate that the size parameter is used