Skip to content

Commit

Permalink
[Bugfix] Pass TwoPhaseIterator from subQueryScorer
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chu <clingzhi@amazon.com>
  • Loading branch information
noCharger committed Feb 6, 2024
1 parent 52b27f4 commit e364dc6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.lucene.search.Scorable;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.TwoPhaseIterator;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.Bits;
import org.opensearch.Version;
Expand Down Expand Up @@ -302,6 +303,11 @@ public DocIdSetIterator iterator() {
return subQueryScorer.iterator();
}

@Override
public TwoPhaseIterator twoPhaseIterator() {
return subQueryScorer.twoPhaseIterator();
}

@Override
public float getMaxScore(int upTo) {
return Float.MAX_VALUE; // TODO: what would be a good upper bound?
Expand Down

0 comments on commit e364dc6

Please sign in to comment.