mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Also short circuit within segment when score mode is avg
This commit is contained in:
parent
ac1e985670
commit
1285894f5f
@ -338,6 +338,11 @@ public class ChildrenQuery extends Query {
|
||||
|
||||
@Override
|
||||
public int nextDoc() throws IOException {
|
||||
if (remaining == 0) {
|
||||
currentDocId = NO_MORE_DOCS;
|
||||
return NO_MORE_DOCS;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
currentDocId = parentsIterator.nextDoc();
|
||||
if (currentDocId == DocIdSetIterator.NO_MORE_DOCS) {
|
||||
@ -356,6 +361,11 @@ public class ChildrenQuery extends Query {
|
||||
|
||||
@Override
|
||||
public int advance(int target) throws IOException {
|
||||
if (remaining == 0) {
|
||||
currentDocId = NO_MORE_DOCS;
|
||||
return NO_MORE_DOCS;
|
||||
}
|
||||
|
||||
currentDocId = parentsIterator.advance(target);
|
||||
if (currentDocId == DocIdSetIterator.NO_MORE_DOCS) {
|
||||
return currentDocId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user