mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Merge pull request #17579 from consulthys/master
Java API: Modified scrolling docs to match with the REST API docs
This commit is contained in:
commit
975094f7d4
@ -55,7 +55,7 @@ import static org.elasticsearch.index.query.QueryBuilders.*;
|
|||||||
QueryBuilder qb = termQuery("multi", "test");
|
QueryBuilder qb = termQuery("multi", "test");
|
||||||
|
|
||||||
SearchResponse scrollResp = client.prepareSearch(test)
|
SearchResponse scrollResp = client.prepareSearch(test)
|
||||||
.setSearchType(SearchType.SCAN)
|
.addSort(FieldSortBuilder.DOC_FIELD_NAME, SortOrder.ASC)
|
||||||
.setScroll(new TimeValue(60000))
|
.setScroll(new TimeValue(60000))
|
||||||
.setQuery(qb)
|
.setQuery(qb)
|
||||||
.setSize(100).execute().actionGet(); //100 hits per shard will be returned for each scroll
|
.setSize(100).execute().actionGet(); //100 hits per shard will be returned for each scroll
|
||||||
|
Loading…
x
Reference in New Issue
Block a user