diff --git a/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java b/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java index 6167663536946..901f9e820ad3f 100644 --- a/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java +++ b/server/src/main/java/org/opensearch/common/lucene/MinimumScoreCollector.java @@ -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; @@ -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;