Class Similarity.SimScorer
java.lang.Object
org.apache.lucene.search.similarities.Similarity.SimScorer
- Enclosing class:
- Similarity
API for scoring "sloppy" queries such as 
TermQuery,
 SpanQuery, and PhraseQuery.
 
 Frequencies are floating-point values: an approximate 
 within-document frequency adjusted for "sloppiness" by 
 computeSlopFactor(int).
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract floatcomputePayloadFactor(int doc, int start, int end, BytesRef payload) Calculate a scoring factor based on the data in the payload.abstract floatcomputeSlopFactor(int distance) Computes the amount of a sloppy phrase match, based on an edit distance.explain(int doc, Explanation freq) Explain the score for a single documentabstract floatscore(int doc, float freq) Score a single document
- 
Constructor Details- 
SimScorerpublic SimScorer()Sole constructor. (For invocation by subclass constructors, typically implicit.)
 
- 
- 
Method Details- 
scorepublic abstract float score(int doc, float freq) Score a single document- Parameters:
- doc- document id within the inverted index segment
- freq- sloppy term frequency
- Returns:
- document's score
 
- 
computeSlopFactorpublic abstract float computeSlopFactor(int distance) Computes the amount of a sloppy phrase match, based on an edit distance.
- 
computePayloadFactorCalculate a scoring factor based on the data in the payload.
- 
explainExplain the score for a single document- Parameters:
- doc- document id within the inverted index segment
- freq- Explanation of how the sloppy term frequency was computed
- Returns:
- document's score
 
 
-