iprithv commented on code in PR #16069:
URL: https://github.com/apache/lucene/pull/16069#discussion_r3282869159
##########
lucene/core/src/java/org/apache/lucene/search/MaxScoreBulkScorer.java:
##########
@@ -184,6 +188,69 @@ private void scoreInnerWindowWithFilter(
int innerWindowMax = MathUtil.unsignedMin(max, innerWindowMin +
INNER_WINDOW_SIZE);
docAndScoreAccBuffer.size = 0;
+ if (filterMatches == null) {
+ fillScoreBufferViaLeapFrog(top, acceptDocs, innerWindowMax);
+ } else {
+ fillScoreBufferViaBitSet(top, acceptDocs, innerWindowMax);
+ }
+
+ scoreNonEssentialClauses(collector, docAndScoreAccBuffer,
firstEssentialScorer);
+ }
+
+ private void fillScoreBufferViaBitSet(DisiWrapper top, Bits acceptDocs, int
innerWindowMax)
+ throws IOException {
+ filterMatches.clear();
+ int innerWindowMin = top.doc;
+ if (filter.doc < innerWindowMax) {
+ if (filter.doc < innerWindowMin) {
+ filter.doc = filter.approximation.advance(innerWindowMin);
+ }
+ if (filter.doc < innerWindowMax) {
+ filter.approximation.intoBitSet(innerWindowMax, filterMatches,
innerWindowMin);
+ filter.doc = filter.approximation.docID();
+ }
+ }
+ if (acceptDocs != null) {
+ acceptDocs.applyMask(filterMatches, innerWindowMin);
+ }
+
+ int innerWindowSize = innerWindowMax - innerWindowMin;
+ // Collect matches of essential clauses into a bitset, checking filter via
bitset lookup
+ do {
Review Comment:
sure, updated. thanks!
--
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]