private final class TFIDFSimilarity.TFIDFSimScorer extends Similarity.SimScorer
Modifier and Type | Field and Description |
---|---|
private NumericDocValues |
norms |
private float[] |
normTable |
private TFIDFSimilarity.IDFStats |
stats |
private float |
weightValue |
Constructor and Description |
---|
TFIDFSimScorer(TFIDFSimilarity.IDFStats stats,
NumericDocValues norms,
float[] normTable) |
Modifier and Type | Method and Description |
---|---|
float |
computePayloadFactor(int doc,
int start,
int end,
BytesRef payload)
Calculate a scoring factor based on the data in the payload.
|
float |
computeSlopFactor(int distance)
Computes the amount of a sloppy phrase match, based on an edit distance.
|
Explanation |
explain(int doc,
Explanation freq)
Explain the score for a single document
|
float |
score(int doc,
float freq)
Score a single document
|
private final TFIDFSimilarity.IDFStats stats
private final float weightValue
private final NumericDocValues norms
private final float[] normTable
TFIDFSimScorer(TFIDFSimilarity.IDFStats stats, NumericDocValues norms, float[] normTable) throws java.io.IOException
java.io.IOException
public float score(int doc, float freq) throws java.io.IOException
Similarity.SimScorer
score
in class Similarity.SimScorer
doc
- document id within the inverted index segmentfreq
- sloppy term frequencyjava.io.IOException
public float computeSlopFactor(int distance)
Similarity.SimScorer
computeSlopFactor
in class Similarity.SimScorer
public float computePayloadFactor(int doc, int start, int end, BytesRef payload)
Similarity.SimScorer
computePayloadFactor
in class Similarity.SimScorer
public Explanation explain(int doc, Explanation freq) throws java.io.IOException
Similarity.SimScorer
explain
in class Similarity.SimScorer
doc
- document id within the inverted index segmentfreq
- Explanation of how the sloppy term frequency was computedjava.io.IOException