Hi,
 I want to parse through a bunch of indices, each having 5 shards, 
searching for some content. I would like to receive a fixed number of 
results from each scroll call. I realize that scroll can be provided with a 
batch size per shard. 
http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/scan-scroll.html

For the case below, could you tell me how to ensure that I receive a fixed 
number of results for each scroll call.

I have Index A [ 5 shards] with 500 documents that will match my search.
I have Index B [ 5 shards] with 100 documents that will match my search.
I have Index C [ 5 shards] with 50 documents that will match my search.

If I want to receive 75 results in each search, I create a scroll with 
batch size of 5 [ i.e 5 results from each shard]

In the first few calls I get 75 results, but after 2 such calls, I will be 
left with the following

Index A [ 5 shards] with 450 documents that will match my search.
Index B [ 5 shards] with 50 documents that will match my search.
Index C [ 5 shards] with 0 documents that will match my search.

Now my 3rd scroll call, will only return 25 results from Index A and 25 
results from Index B.

Is there any elegant way to specify that each scroll call provide a fixed 
number of results?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/a60e9505-3e11-42c0-b1ad-6f19be861983%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to