mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-26 08:07:27 -04:00
parent
70491f7e7d
commit
89294e90fe
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ SearchResponse scrollResp = client.prepareSearch(test)
|
||||||
//Scroll until no hits are returned
|
//Scroll until no hits are returned
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
for (SearchHit hit : scrollResp.getHits()) {
|
for (SearchHit hit : scrollResp.getHits().getHits()) {
|
||||||
//Handle the hit...
|
//Handle the hit...
|
||||||
}
|
}
|
||||||
scrollResp = client.prepareSearchScroll(scrollResp.getScrollId()).setScroll(new TimeValue(600000)).execute().actionGet();
|
scrollResp = client.prepareSearchScroll(scrollResp.getScrollId()).setScroll(new TimeValue(600000)).execute().actionGet();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue