Package org.apache.lucene.search
Class MultiNormsLeafSimScorer
- java.lang.Object
-
- org.apache.lucene.search.MultiNormsLeafSimScorer
-
final class MultiNormsLeafSimScorer extends java.lang.Object
Copy ofLeafSimScorer
that sums document's norms from multiple fields.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
MultiNormsLeafSimScorer.MultiFieldNormValues
-
Field Summary
Fields Modifier and Type Field Description private static float[]
LENGTH_TABLE
Cache of decoded norms.private NumericDocValues
norms
private Similarity.SimScorer
scorer
-
Constructor Summary
Constructors Constructor Description MultiNormsLeafSimScorer(Similarity.SimScorer scorer, LeafReader reader, java.util.Collection<BM25FQuery.FieldAndWeight> normFields, boolean needsScores)
Sole constructor: Score documents ofreader
withscorer
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanation
explain(int doc, Explanation freqExpl)
Explain the score for the provided document assuming the given term document frequency.private long
getNormValue(int doc)
float
score(int doc, float freq)
Score the provided document assuming the given term document frequency.
-
-
-
Field Detail
-
LENGTH_TABLE
private static final float[] LENGTH_TABLE
Cache of decoded norms.
-
scorer
private final Similarity.SimScorer scorer
-
norms
private final NumericDocValues norms
-
-
Constructor Detail
-
MultiNormsLeafSimScorer
MultiNormsLeafSimScorer(Similarity.SimScorer scorer, LeafReader reader, java.util.Collection<BM25FQuery.FieldAndWeight> normFields, boolean needsScores) throws java.io.IOException
Sole constructor: Score documents ofreader
withscorer
.- Throws:
java.io.IOException
-
-
Method Detail
-
getNormValue
private long getNormValue(int doc) throws java.io.IOException
- Throws:
java.io.IOException
-
score
public float score(int doc, float freq) throws java.io.IOException
Score the provided document assuming the given term document frequency. This method must be called on non-decreasing sequences of doc ids.- Throws:
java.io.IOException
- See Also:
Similarity.SimScorer.score(float, long)
-
explain
public Explanation explain(int doc, Explanation freqExpl) throws java.io.IOException
Explain the score for the provided document assuming the given term document frequency. This method must be called on non-decreasing sequences of doc ids.- Throws:
java.io.IOException
- See Also:
Similarity.SimScorer.explain(Explanation, long)
-
-