Package org.apache.lucene.search
Class MaxScoreSumPropagator
- java.lang.Object
-
- org.apache.lucene.search.MaxScoreSumPropagator
-
final class MaxScoreSumPropagator extends java.lang.Object
Utility class to propagate scoring information inBooleanQuery
, which compute the score as the sum of the scores of its matching clauses. This helps propagate information about the maximum produced score
-
-
Field Summary
Fields Modifier and Type Field Description private int
numClauses
private Scorer[]
scorers
private double[]
sumOfOtherMaxScores
-
Constructor Summary
Constructors Constructor Description MaxScoreSumPropagator(java.util.Collection<? extends Scorer> scorerList)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
advanceShallow(int target)
private static double[]
computeSumOfComplement(float[] v)
Return an array which, at index i, stores the sum of all entries ofv
except the one at index i.(package private) float
getMaxScore(int upTo)
private float
getMinCompetitiveScore(float minScoreSum, double sumOfOtherMaxScores)
Return the minimum score that a Scorer must produce in order for a hit to be competitive.private float
scoreSumUpperBound(double sum)
(package private) void
setMinCompetitiveScore(float minScore)
-
-
-
Field Detail
-
numClauses
private final int numClauses
-
scorers
private final Scorer[] scorers
-
sumOfOtherMaxScores
private final double[] sumOfOtherMaxScores
-
-
Constructor Detail
-
MaxScoreSumPropagator
MaxScoreSumPropagator(java.util.Collection<? extends Scorer> scorerList) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
computeSumOfComplement
private static double[] computeSumOfComplement(float[] v)
Return an array which, at index i, stores the sum of all entries ofv
except the one at index i.
-
advanceShallow
void advanceShallow(int target) throws java.io.IOException
- Throws:
java.io.IOException
-
getMaxScore
float getMaxScore(int upTo) throws java.io.IOException
- Throws:
java.io.IOException
-
setMinCompetitiveScore
void setMinCompetitiveScore(float minScore) throws java.io.IOException
- Throws:
java.io.IOException
-
getMinCompetitiveScore
private float getMinCompetitiveScore(float minScoreSum, double sumOfOtherMaxScores)
Return the minimum score that a Scorer must produce in order for a hit to be competitive.
-
scoreSumUpperBound
private float scoreSumUpperBound(double sum)
-
-