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


##########
lucene/core/src/java/org/apache/lucene/search/DenseConjunctionBulkScorer.java:
##########
@@ -236,10 +236,13 @@ private void scoreWindowUsingBitSet(
       windowMatches.set(0, windowMax - windowBase);
     } else {
       DocIdSetIterator lead = iterators.get(0);
+      int intoBitSetBase = windowBase;
       if (lead.docID() < windowBase) {
-        lead.advance(windowBase);
+        intoBitSetBase = lead.advance(windowBase);
+      }
+      if (intoBitSetBase < windowMax) {
+        lead.intoBitSet(windowMax, windowMatches, intoBitSetBase);

Review Comment:
   If there are 2 iterators intersecting, like:
   
   ```
   lead:  10000, 10001, 10002
   other: 10000, 10002, 10003
   ```
   
   Then we want to load them into a 4-bit bitset. We should use the same offset 
for them, like 10000:
   ```
   lead bitset:  0, 1, 2
   other bitset: 0, 2, 3
   ```
   
   So that they can do conjunction.
   
   Your change is using `intoBitSetBase` as the offset of lead, but 
`windowBase` as the offset of others, so i do not think they can intersect 
properly?
   
   



-- 
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