epotyom commented on code in PR #16510:
URL: https://github.com/apache/lucene/pull/16510#discussion_r3923468648
##########
lucene/core/src/java/org/apache/lucene/search/IndexSortSortedNumericDocValuesRangeQuery.java:
##########
@@ -700,5 +701,26 @@ public int advance(int target) throws IOException {
public long cost() {
return Math.min(delegate.cost(), lastDoc - firstDoc);
}
+
+ @Override
+ public void intoBitSet(int upTo, FixedBitSet bitSet, int offset) throws
IOException {
+ assert offset <= doc && doc >= firstDoc;
+ int boundedUpTo = Math.min(upTo, lastDoc);
+ if (boundedUpTo > doc) {
+ delegate.intoBitSet(boundedUpTo, bitSet, offset);
+ }
+ int delegateDoc = delegate.docID();
+ if (delegateDoc < lastDoc) {
+ doc = delegateDoc;
+ } else {
+ doc = NO_MORE_DOCS;
+ }
+ }
+
+ @Override
+ public int docIDRunEnd() throws IOException {
Review Comment:
Maybe worth adding a small test for this method as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]