Skip to content

Commit

Permalink
Merge pull request #201 from expani/issue-11415-clone
Browse files Browse the repository at this point in the history
Fix for failing test QueryPhaseTests#testMinScoreDisablesCountOptimization
  • Loading branch information
reta authored Dec 18, 2024
2 parents bae0338 + b633132 commit b2ac498
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.lucene.search.Scorable;
import org.apache.lucene.search.ScoreCachingWrappingScorer;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Weight;

import java.io.IOException;

Expand Down Expand Up @@ -81,6 +82,11 @@ public void collect(int doc) throws IOException {
});
}

@Override
public void setWeight(Weight weight) {
// Not redirecting to delegate collector to maintain same behaviour when this extended SimpleCollector.
}

@Override
public ScoreMode scoreMode() {
return in.scoreMode() == ScoreMode.TOP_SCORES ? ScoreMode.TOP_SCORES : ScoreMode.COMPLETE;
Expand Down

0 comments on commit b2ac498

Please sign in to comment.