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


##########
lucene/core/src/java/org/apache/lucene/search/DenseConjunctionBulkScorer.java:
##########
@@ -238,9 +296,77 @@ private void scoreWindowUsingBitSet(
     windowMatches.clear();
   }
 
+  private void scoreWindowUsingLeapFrog(
+      LeafCollector collector,
+      Bits acceptDocs,
+      List<DocIdSetIterator> approximations,
+      List<TwoPhaseIterator> twoPhases,
+      int min,
+      int max)
+      throws IOException {
+    if (approximations.size() == 1) {
+      // Since a TwoPhaseIterator comes with its approximation, the number of 
approximations is gte
+      // the number of TwoPhaseIterators
+      assert twoPhases.size() <= 1;
+      TwoPhaseIterator twoPhase = twoPhases.get(0);
+      DocIdSetIterator approximation = approximations.isEmpty() ? null : 
approximations.get(0);

Review Comment:
   ```suggestion
         DocIdSetIterator approximation = approximations.get(0);
         TwoPhaseIterator twoPhase = twoPhases.isEmpty() ? null : 
twoPhases.get(0);
   ```



##########
lucene/core/src/java/org/apache/lucene/search/DenseConjunctionBulkScorer.java:
##########
@@ -238,9 +296,77 @@ private void scoreWindowUsingBitSet(
     windowMatches.clear();
   }
 
+  private void scoreWindowUsingLeapFrog(

Review Comment:
   Out of curiosity: why we are choosing such a per-doc conjunction algorithm 
instead of scoring approximations into a bitset and check `matches` for 
existing bits? Actually i also thought about something like 
`IndexedDISI#intoBitset` to speed up range queries on sparse doc values :)



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