java.lang.Object | ||
↳ | org.apache.lucene.search.Similarity | |
↳ | org.apache.lucene.search.DefaultSimilarity |
Expert: Default scoring implementation.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.Similarity
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
discountOverlaps |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Implemented as
state.getBoost()*lengthNorm(numTerms) , where
numTerms is getLength() if setDiscountOverlaps(boolean) is false, else it's getLength() - getNumOverlap() . | |||||||||||
Implemented as
overlap / maxOverlap . | |||||||||||
Implemented as
log(numDocs/(docFreq+1)) + 1 . | |||||||||||
Implemented as
1/sqrt(numTerms) . | |||||||||||
Implemented as
1/sqrt(sumOfSquaredWeights) . | |||||||||||
Determines whether overlap tokens (Tokens with
0 position increment) are ignored when computing
norm.
| |||||||||||
Implemented as
1 / (distance + 1) . | |||||||||||
Implemented as
sqrt(freq) . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.lucene.search.Similarity
| |||||||||||
From class
java.lang.Object
|
Implemented as
state.getBoost()*lengthNorm(numTerms)
, where
numTerms
is getLength()
if setDiscountOverlaps(boolean)
is false, else it's getLength()
- getNumOverlap()
.
WARNING: This API is new and experimental, and may suddenly change.
field | field name |
---|---|
state | current processing state for this field |
Implemented as overlap / maxOverlap
.
overlap | the number of query terms matched in the document |
---|---|
maxOverlap | the total number of terms in the query |
Implemented as log(numDocs/(docFreq+1)) + 1
.
docFreq | the number of documents which contain the term |
---|---|
numDocs | the total number of documents in the collection |
Implemented as 1/sqrt(numTerms)
.
fieldName | the name of the field |
---|---|
numTerms | the total number of tokens contained in fields named fieldName of doc. |
Implemented as 1/sqrt(sumOfSquaredWeights)
.
sumOfSquaredWeights | the sum of the squares of query term weights |
---|
Determines whether overlap tokens (Tokens with 0 position increment) are ignored when computing norm. By default this is false, meaning overlap tokens are counted just like non-overlap tokens.
WARNING: This API is new and experimental, and may suddenly change.
Implemented as 1 / (distance + 1)
.
distance | the edit distance of this sloppy phrase match |
---|
Implemented as sqrt(freq)
.
freq | the frequency of a term within a document |
---|