kkewwei commented on code in PR #16515:
URL: https://github.com/apache/lucene/pull/16515#discussion_r3809794445


##########
lucene/core/src/java/org/apache/lucene/search/TermScorer.java:
##########
@@ -152,6 +153,32 @@ public void nextDocsAndScores(int upTo, Bits liveDocs, 
DocAndFloatFeatureBuffer
       break;
     }
 
+    score(buffer);
+  }
+
+  @Override
+  public void nextDocsAndScores(
+      int upTo, FixedBitSet acceptDocs, int offset, DocAndFloatFeatureBuffer 
buffer)
+      throws IOException {
+    for (; ; ) {

Review Comment:
   Yes, I just want to maintain the same style as the `nextDocsAndScores` 
above; this can be modified as well.



##########
lucene/core/src/java/org/apache/lucene/search/MaxScoreBulkScorer.java:
##########
@@ -301,14 +305,23 @@ private void collectEssentialScoresIntoWindow(
       FixedBitSet filterMatches)
       throws IOException {
     do {
-      for (top.scorer.nextDocsAndScores(innerWindowMax, acceptDocs, 
docAndScoreBuffer);
+      for (nextDocsAndScores(

Review Comment:
   Thanks, this is exactly the motivation for this change.
   
   Whether `acceptDocs` is `null` or not, `filterMatches` is the mask used to 
filter the candidates in this path. When `acceptDocs` is present, we first 
merge live-doc filtering into `filterMatches`
   
   Also, when `acceptDocs` is backed by `FixedBits`, `applyMask(FixedBitSet, 
offset)` uses the optimized word-level implementation, so this merge should 
already be efficient.
   
   If you see another way to pass the combined mask efficiently, I would be 
very interested in exploring it.
   



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

Reply via email to