Skip to content

Commit

Permalink
Fix IpRangeAggregatorTests
Browse files Browse the repository at this point in the history
Rewrote a for-loop in BinaryRangeAggregator to be less confusing. As a
side-effect, it fixed the test.

Signed-off-by: Michael Froh <[email protected]>
  • Loading branch information
msfroh committed Dec 19, 2024
1 parent 8861111 commit 7ca821a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ abstract static class SortedSetRangeLeafCollector extends LeafBucketCollectorBas
public void collect(int doc, long bucket) throws IOException {
if (values.advanceExact(doc)) {
int lo = 0;
int count = 0;
for (long ord = values.nextOrd(); ord != SortedSetDocValues.NO_MORE_DOCS && count < values.docValueCount(); ord = values
.nextOrd(), ++count) {
for (int i = 0; i < values.docValueCount(); i++) {
long ord = values.nextOrd();
if (ord == SortedSetDocValues.NO_MORE_DOCS) {
break;
}
lo = collect(doc, ord, bucket, lo);
}
}
Expand Down

0 comments on commit 7ca821a

Please sign in to comment.