romseygeek opened a new pull request, #16362: URL: https://github.com/apache/lucene/pull/16362
TwoPhaseIterator.intoBitSet() can vectorize two-phase matching across a window of documents, but it does not take into account any previous conjunction clauses that could have excluded documents in the window from consideration. This can cause inefficiencies in DenseConjunctionBulkScorer, where we use intoBitSet for windows that we know have more than 25% matches - for example, a window with 26% matching documents when combined with a two-phase iterator whose approximation matches everything will call `match()` on the 74% of documents in the window that have already been excluded. We add a complementary method `applyMask()` to TwoPhaseIterator that will call matches() on all documents marked as selected in a passed-in BitSet, and clear them if they do not pass. DocValuesRangeIterator can use a bulk implementation, while the default implementation still avoids matching documents already excluded by earlier clauses. DenseConjunctionBulkScorer always calls applyMask() when presented with a TwoPhaseIterator as a trailing clause. -- 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]
