jpountz commented on code in PR #13066:
URL: https://github.com/apache/lucene/pull/13066#discussion_r1531728006
##########
lucene/core/src/java/org/apache/lucene/search/DisjunctionSumScorer.java:
##########
@@ -43,10 +47,25 @@ protected float score(DisiWrapper topList) throws
IOException {
return (float) score;
}
+ @Override
+ public int advanceShallow(int target) throws IOException {
+ int min = DocIdSetIterator.NO_MORE_DOCS;
+ for (Scorer scorer : scorers) {
+ if (scorer.docID() <= target) {
+ min = Math.max(min, scorer.advanceShallow(target));
Review Comment:
I think you meant to do `Math.min` here, not `Math.max`?
```suggestion
min = Math.min(min, scorer.advanceShallow(target));
```
--
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]