net.sf.eos.lucene
Class NormedLengthSimilarity
java.lang.Object
org.apache.lucene.search.Similarity
org.apache.lucene.search.DefaultSimilarity
net.sf.eos.lucene.NormedLengthSimilarity
- All Implemented Interfaces:
- Serializable
public class NormedLengthSimilarity
- extends org.apache.lucene.search.DefaultSimilarity
Normalize the length for lengthNorm(String, int)
to 1.0.
- Author:
- Sascha Kohlmann
- See Also:
- Serialized Form
Method Summary |
float |
coord(int overlap,
int maxOverlap)
|
float |
idf(int docFreq,
int numDocs)
|
float |
lengthNorm(String fieldName,
int numTerms)
|
float |
queryNorm(float sumOfSquaredWeights)
|
float |
sloppyFreq(int distance)
|
float |
tf(float freq)
|
Methods inherited from class org.apache.lucene.search.Similarity |
decodeNorm, encodeNorm, getDefault, getNormDecoder, idf, idf, scorePayload, setDefault, tf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NormedLengthSimilarity
public NormedLengthSimilarity()
lengthNorm
public float lengthNorm(String fieldName,
int numTerms)
- Overrides:
lengthNorm
in class org.apache.lucene.search.DefaultSimilarity
queryNorm
public float queryNorm(float sumOfSquaredWeights)
- Overrides:
queryNorm
in class org.apache.lucene.search.DefaultSimilarity
tf
public float tf(float freq)
- Overrides:
tf
in class org.apache.lucene.search.DefaultSimilarity
sloppyFreq
public float sloppyFreq(int distance)
- Overrides:
sloppyFreq
in class org.apache.lucene.search.DefaultSimilarity
idf
public float idf(int docFreq,
int numDocs)
- Overrides:
idf
in class org.apache.lucene.search.DefaultSimilarity
coord
public float coord(int overlap,
int maxOverlap)
- Overrides:
coord
in class org.apache.lucene.search.DefaultSimilarity
Copyright © 2008. All Rights Reserved.