Package org.apache.lucene.search
Class LeafSimScorer
- java.lang.Object
-
- org.apache.lucene.search.LeafSimScorer
-
public final class LeafSimScorer extends java.lang.ObjectSimilarity.SimScoreron a specificLeafReader.
-
-
Field Summary
Fields Modifier and Type Field Description private NumericDocValuesnormsprivate Similarity.SimScorerscorer
-
Constructor Summary
Constructors Constructor Description LeafSimScorer(Similarity.SimScorer scorer, LeafReader reader, java.lang.String field, boolean needsScores)Sole constructor: Score documents ofreaderwithscorer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanationexplain(int doc, Explanation freqExpl)Explain the score for the provided document assuming the given term document frequency.private longgetNormValue(int doc)Similarity.SimScorergetSimScorer()Return the wrappedSimilarity.SimScorer.floatscore(int doc, float freq)Score the provided document assuming the given term document frequency.
-
-
-
Field Detail
-
scorer
private final Similarity.SimScorer scorer
-
norms
private final NumericDocValues norms
-
-
Constructor Detail
-
LeafSimScorer
public LeafSimScorer(Similarity.SimScorer scorer, LeafReader reader, java.lang.String field, boolean needsScores) throws java.io.IOException
Sole constructor: Score documents ofreaderwithscorer.- Throws:
java.io.IOException
-
-
Method Detail
-
getSimScorer
public Similarity.SimScorer getSimScorer()
Return the wrappedSimilarity.SimScorer.
-
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.IOExceptionScore 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)
-
-