Package org.apache.lucene.search
Class DisjunctionScoreBlockBoundaryPropagator
java.lang.Object
org.apache.lucene.search.DisjunctionScoreBlockBoundaryPropagator
A helper to propagate block boundaries for disjunctions. Because a disjunction matches if any of
its sub clauses matches, it is tempting to return the minimum block boundary across all clauses.
The problem is that it might then make the query slow when the minimum competitive score is high
and low-scoring clauses don't drive iteration anymore. So this class computes block boundaries
only across clauses whose maximum score is greater than or equal to the minimum competitive
score, or the maximum scoring clause if there is no such clause.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final Comparator<Scorer>
private final float[]
private final Scorer[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
advanceShallow
(int target) (package private) void
setMinCompetitiveScore
(float minScore) Set the minimum competitive score to filter out clauses that score less than this threshold.
-
Field Details
-
MAX_SCORE_COMPARATOR
-
scorers
-
maxScores
private final float[] maxScores -
leadIndex
private int leadIndex
-
-
Constructor Details
-
DisjunctionScoreBlockBoundaryPropagator
DisjunctionScoreBlockBoundaryPropagator(Collection<Scorer> scorers) throws IOException - Throws:
IOException
-
-
Method Details
-
advanceShallow
- Throws:
IOException
-
setMinCompetitiveScore
Set the minimum competitive score to filter out clauses that score less than this threshold.- Throws:
IOException
- See Also:
-