Package org.apache.lucene.search
Class MaxScoreSumPropagator
java.lang.Object
org.apache.lucene.search.MaxScoreSumPropagator
Utility class to propagate scoring information in
BooleanQuery, 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidadvanceShallow(int target) private static double[]computeSumOfComplement(float[] v) Return an array which, at index i, stores the sum of all entries ofvexcept the one at index i.(package private) floatgetMaxScore(int upTo) private floatgetMinCompetitiveScore(float minScoreSum, double sumOfOtherMaxScores) Return the minimum score that a Scorer must produce in order for a hit to be competitive.private floatscoreSumUpperBound(double sum) (package private) voidsetMinCompetitiveScore(float minScore)
-
Field Details
-
numClauses
private final int numClauses -
scorers
-
sumOfOtherMaxScores
private final double[] sumOfOtherMaxScores
-
-
Constructor Details
-
MaxScoreSumPropagator
MaxScoreSumPropagator(Collection<? extends Scorer> scorerList) throws IOException - Throws:
IOException
-
-
Method Details
-
computeSumOfComplement
private static double[] computeSumOfComplement(float[] v) Return an array which, at index i, stores the sum of all entries ofvexcept the one at index i. -
advanceShallow
- Throws:
IOException
-
getMaxScore
- Throws:
IOException
-
setMinCompetitiveScore
- Throws:
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)
-