Scan/scroll, when performed over multiple nodes/shards, is inherently executed in parallel.
Scan/scroll depends on the scroll ID chain, so you have to execute a scan/scroll sequence serially. For a single shard you can add filters to the query in order to partition the search hits, these queries can be executed with several scan/scroll requests in parallel from your client. Jörg On Thu, Oct 16, 2014 at 2:36 PM, Vijay Tiwary <[email protected]> wrote: > Thanks Alex. I have done it like this: > > while (true) { > scrollResp = > *client.prepareSearchScroll(scrollResp.getScrollId()).setScroll(new > TimeValue(600000)).execute().actionGet();* > SearchHits sh= scrollResp.getHits(); > SearchHit[] searchHit = sh.getHits(); > > LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length); > if (scrollResp.getHits().getHits().length == 0) { > break; > } > } > > So assuming I have only on shard and i am fetching total of 100,000 > documents in steps of 10,000 documents then there will be 10 get calls and > this call will happen serially one after the other. Is there a mechanism by > any chance to execute this get calls in parallel. > -- 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/CAKdsXoE_xwffAzsiACRB374rn6GR3hN44rnJvHfa4GZiWMxryg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
