Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ Optimizations
* GITHUB#16283: Use Panama Vector API to SIMD-evaluate fixed-cardinality sorted numeric range queries in
rangeIntoBitSet. (Costin Leau)

* GITHUB#16352: Better cost() estimation for SkipBlockRangeIterator. (Alan Woodward)

Bug Fixes
---------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public Match getMatch() {

@Override
public long cost() {
return DocIdSetIterator.NO_MORE_DOCS;
return skipper.docCount();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ public void testIntoBitSet() throws Exception {

assertEquals(expected, bitSet);
}

public void testCost() {
DocValuesSkipper skipper = docValuesSkipper(1, 30, random().nextBoolean());
SkipBlockRangeIterator it = new SkipBlockRangeIterator(skipper, 1, 30);
assertEquals(DENSE_END + (MAX_DOC - DENSE_END) / 2, it.cost());
}
}
Loading