HoustonPutman commented on code in PR #16515:
URL: https://github.com/apache/lucene/pull/16515#discussion_r3806781940
##########
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:
This would be cleaner as a `do {} while (buffer.size == 0 &&
postingsEnum.docID() < upTo)`
##########
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:
in `fillScoreBufferViaBitSet()`, this exists:
```java
if (acceptDocs != null) {
acceptDocs.applyMask(filterMatches, innerWindowMin);
}
```
But it never passes the acceptDocs to the collect:
```java
collectEssentialScoresIntoWindow(top, innerWindowMax, innerWindowMin, null,
filterMatches);
```
So there is a problem if acceptDocs is null, in which point, there should be
a way to have `filterMatches` be turned into its own (offset-acknowledging)
`Bits` object. But other than that, the `acceptDocs` should be able to be used
on its own. Though `acceptDocs.applyMask(filterMatches, innerWindowMin)` might
be able to be optimized with a better implementation for this use case.
--
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]