Skip to content

Commit bafd903

Browse files
expaniandrross
authored andcommitted
Delegating nextDoc to advance as previous assumption doesn't hold with current ConstantScoreSupplier
Signed-off-by: expani <[email protected]>
1 parent ae5c421 commit bafd903

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/src/main/java/org/opensearch/search/aggregations/metrics/CardinalityAggregator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,8 @@ public int advance(int target) throws IOException {
452452
}
453453

454454
@Override
455-
public int nextDoc() {
456-
// don't expect this to be called based on its usage in DefaultBulkScorer
457-
throw new UnsupportedOperationException();
455+
public int nextDoc() throws IOException {
456+
return advance(slowDocId + 1);
458457
}
459458

460459
@Override

0 commit comments

Comments
 (0)