mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 15:47:23 -04:00
Replaced SCAN search type with _doc sort in scroll query
This commit is contained in:
parent
d1cfe0e7cd
commit
e3199824ba
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ import static org.elasticsearch.index.query.QueryBuilders.*;
|
|||
QueryBuilder qb = termQuery("multi", "test");
|
||||
|
||||
SearchResponse scrollResp = client.prepareSearch(test)
|
||||
.setSearchType(SearchType.SCAN)
|
||||
.addSort(FieldSortBuilder.DOC_FIELD_NAME, SortOrder.ASC)
|
||||
.setScroll(new TimeValue(60000))
|
||||
.setQuery(qb)
|
||||
.setSize(100).execute().actionGet(); //100 hits per shard will be returned for each scroll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue