I want to for example, fast get 1m out of 5m records.
I am currently using:

SearchResponse scrollResp = this.client
 .prepareSearch(esQuery.indices) 

 .addFields(esQuery.fields) 

 .setSearchType(SearchType.SCAN) 

 .setScroll( 

 TimeValue 

 .timeValueSeconds(this.scrollTimeInSeconds)) 

 .setQuery(esQuery.query) 

 .setSize(this.queryBatchSizePershard).execute().actionGet();


but the setSize defines how many records return per shard in one scroll. Is 
there a way to define a limit? or I have to control the limit in my code.

Chen

-- 
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/5fb4751f-7080-423c-9acd-bfd56abfd844%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to