diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java index cccb1af57d2..52dfde19c0f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/docset/AllDocSet.java @@ -66,7 +66,7 @@ public class AllDocSet extends DocSet { if (++doc < maxDoc) { return doc; } - return NO_MORE_DOCS; + return doc = NO_MORE_DOCS; } @Override public int advance(int target) throws IOException { @@ -74,7 +74,7 @@ public class AllDocSet extends DocSet { if (doc < maxDoc) { return doc; } - return NO_MORE_DOCS; + return doc = NO_MORE_DOCS; } } }