From b0b3748cae1c64578fc44dbe874f3af3226a79bf Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Fri, 25 Oct 2013 19:05:20 +0200 Subject: [PATCH] Re-apply pull-request #3956 now that the CLA has been signed. --- .../org/elasticsearch/index/search/child/ChildrenQuery.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/elasticsearch/index/search/child/ChildrenQuery.java b/src/main/java/org/elasticsearch/index/search/child/ChildrenQuery.java index 616563db3a1..914898d7ca1 100644 --- a/src/main/java/org/elasticsearch/index/search/child/ChildrenQuery.java +++ b/src/main/java/org/elasticsearch/index/search/child/ChildrenQuery.java @@ -276,6 +276,7 @@ public class ChildrenQuery extends Query { @Override public int nextDoc() throws IOException { if (remaining == 0) { + currentDocId = NO_MORE_DOCS; return NO_MORE_DOCS; } @@ -297,6 +298,7 @@ public class ChildrenQuery extends Query { @Override public int advance(int target) throws IOException { if (remaining == 0) { + currentDocId = NO_MORE_DOCS; return NO_MORE_DOCS; }