mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 23:57:20 -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
|
||||
while (true) {
|
||||
|
||||
for (SearchHit hit : scrollResp.getHits()) {
|
||||
for (SearchHit hit : scrollResp.getHits().getHits()) {
|
||||
//Handle the hit...
|
||||
}
|
||||
scrollResp = client.prepareSearchScroll(scrollResp.getScrollId()).setScroll(new TimeValue(600000)).execute().actionGet();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue