Module org.apache.lucene.core
Package org.apache.lucene.search
Class DisjunctionScoreBlockBoundaryPropagator
- java.lang.Object
-
- org.apache.lucene.search.DisjunctionScoreBlockBoundaryPropagator
-
final class DisjunctionScoreBlockBoundaryPropagator extends java.lang.Object
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.
-
-
Constructor Summary
Constructors Constructor Description DisjunctionScoreBlockBoundaryPropagator(java.util.Collection<Scorer> scorers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (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.
-
-
-
Constructor Detail
-
DisjunctionScoreBlockBoundaryPropagator
DisjunctionScoreBlockBoundaryPropagator(java.util.Collection<Scorer> scorers) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
advanceShallow
int advanceShallow(int target) throws java.io.IOException
- Throws:
java.io.IOException
-
setMinCompetitiveScore
void setMinCompetitiveScore(float minScore) throws java.io.IOException
Set the minimum competitive score to filter out clauses that score less than this threshold.- Throws:
java.io.IOException
- See Also:
Scorable.setMinCompetitiveScore(float)
-
-