gf2121 commented on code in PR #14882:
URL: https://github.com/apache/lucene/pull/14882#discussion_r2177424439


##########
lucene/core/src/test/org/apache/lucene/search/TestKnnFloatVectorQuery.java:
##########
@@ -276,6 +277,40 @@ public void testDocAndScoreQueryBasics() throws 
IOException {
     }
   }
 
+  @Nightly
+  public void testKnnQueryWithFiltering() throws IOException {

Review Comment:
   I wonder if `TestIndexedDISI` is a better place to test this?



##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/IndexedDISI.java:
##########
@@ -719,10 +719,10 @@ boolean intoBitSetWithinBlock(IndexedDISI disi, int upTo, 
FixedBitSet bitSet, in
         if (disi.bitSet == null) {
           disi.bitSet = new FixedBitSet(BLOCK_SIZE);
         }
-
-        int sourceFrom = disi.doc & 0xFFFF;
-        int sourceTo = Math.min(upTo - disi.block, BLOCK_SIZE);
         int destFrom = disi.doc - offset;
+        int disiTo = upTo == DocIdSetIterator.NO_MORE_DOCS ? bitSet.length() : 
upTo;

Review Comment:
   Maybe use `Math.min(upTo, bitSet.length())` to be more robust.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to