A getHits() was forgotten!

(cherry picked from commit 11b3053)
This commit is contained in:
eBuildy 2015-01-15 19:01:52 +01:00 committed by David Pilato
parent 70491f7e7d
commit 89294e90fe

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