make more readable

Original commit: elastic/x-pack-elasticsearch@c7727618ac
This commit is contained in:
Martijn van Groningen 2014-10-29 14:08:06 +01:00
parent 12a6de0a57
commit 3e45310877

View File

@ -185,7 +185,7 @@ public class AlertsStore extends AbstractComponent {
.setTypes(AlertManager.ALERT_TYPE)
.setIndices(AlertManager.ALERT_INDEX).get();
try {
for (; response.getHits().hits().length != 0; response = client.prepareSearchScroll(response.getScrollId()).setScroll(scrollTimeout).get()) {
while (response.getHits().hits().length != 0) {
for (SearchHit sh : response.getHits()) {
String alertId = sh.getId();
Alert alert = parseAlert(alertId, sh);