Fix for has_child can cause an infinite loop (100% CPU) when used in bool query.
Closes #3955
This commit is contained in:
parent
35b573ff24
commit
adadc72da3
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue