Scan and Scroll in Elastic Search 2.4

We are using Elastic Search 2.4. we use the java client to invoke scan and scroll api to scan through large num of docs..However, i dont see a performance boost as much as it is expected of scan and scroll api...I just wanted to check if my configurations require any more optimizations.

This is how i am doing scan

client().prepareSearch(content.getIndexName())
.setQuery("match_all_query")).setSearchType(SearchType.QUERY_AND_FETCH)
.setScroll(new TimeValue(15000)).setSize(size);

and this is how i am using scroll

client().prepareSearchScroll(scrollID).setScroll(new TimeValue(15000)).execute().actionGet();

I see that in ES 2.4, Using Searchtype.SCAN is deprecated. And i am also aware that scan api doesnt perform any sorting by default....

  1. Is it the same case with QUERY_AND_FETCH or do we have to explicitly specify the sort order to not sort the results

  2. also, do we have a limit on the number of results returned by SCAN/QUERY_AND_FETCH

  3. Do we have any standard optimal configuration which ElasticSearch recommends, given that my usecase is just to scan through all the docs stored in index and delete them conditionally

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