A getHits() was forgotten!

(cherry picked from commit 11b3053)
(cherry picked from commit 89294e9)
This commit is contained in:
eBuildy 2015-01-15 19:01:52 +01:00 committed by David Pilato
parent 5acf565e05
commit 5c57db4aae
1 changed files with 1 additions and 1 deletions

View File

@ -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();