The DefaultSimilarity type exposes the following members.
Methods
Name | Description | |
---|---|---|
ComputeNorm | Implemented as
(Overrides Similarity..::..ComputeNorm(String, FieldInvertState).)CopyC# state.getBoost()*lengthNorm(numTerms) CopyC# numTerms | |
Coord | Implemented as (Overrides Similarity..::..Coord(Int32, Int32).)CopyC# overlap / maxOverlap | |
Equals | (Inherited from Object.) | |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetDiscountOverlaps | ||
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Idf(Int32, Int32) | Implemented as (Overrides Similarity..::..Idf(Int32, Int32).)CopyC# log(numDocs/(docFreq+1)) + 1 | |
Idf(ICollection, Searcher) | Obsolete. Computes a score factor for a phrase.
The default implementation sums the {@link #Idf(Term,Searcher)} factor
for each term in the phrase.
(Inherited from Similarity.) | |
Idf(Term, Searcher) | Obsolete. Computes a score factor for a simple term.
The default implementation is: (Inherited from Similarity.)return idf(searcher.docFreq(term), searcher.maxDoc());Note that {@link Searcher#MaxDoc()} is used instead of {@link Lucene.Net.Index.IndexReader#NumDocs()} because it is proportional to {@link Searcher#DocFreq(Term)} , i.e., when one is inaccurate, so is the other, and in the same direction. | |
idfExplain | Computes a score factor for a phrase.
The default implementation sums the idf factor for
each term in the phrase.
(Inherited from Similarity.) | |
IdfExplain | Computes a score factor for a simple term and returns an explanation
for that score factor.
The default implementation uses:
(Inherited from Similarity.)idf(searcher.docFreq(term), searcher.maxDoc());Note that {@link Searcher#MaxDoc()} is used instead of {@link Lucene.Net.Index.IndexReader#NumDocs()} because it is proportional to {@link Searcher#DocFreq(Term)} , i.e., when one is inaccurate, so is the other, and in the same direction. | |
LengthNorm | Implemented as (Overrides Similarity..::..LengthNorm(String, Int32).)CopyC# 1/sqrt(numTerms) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
QueryNorm | Implemented as (Overrides Similarity..::..QueryNorm(Single).)CopyC# 1/sqrt(sumOfSquaredWeights) | |
ScorePayload(String, array<Byte>[]()[][], Int32, Int32) | Obsolete. Calculate a scoring factor based on the data in the payload. Overriding implementations
are responsible for interpreting what is in the payload. Lucene makes no assumptions about
what is in the byte array.
The default implementation returns 1.
(Inherited from Similarity.) | |
ScorePayload(Int32, String, Int32, Int32, array<Byte>[]()[][], Int32, Int32) | Calculate a scoring factor based on the data in the payload. Overriding implementations
are responsible for interpreting what is in the payload. Lucene makes no assumptions about
what is in the byte array.
The default implementation returns 1.
(Inherited from Similarity.) | |
SetDiscountOverlaps | 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. | |
SloppyFreq | Implemented as (Overrides Similarity..::..SloppyFreq(Int32).)CopyC# 1 / (distance + 1) | |
Tf(Single) | Implemented as (Overrides Similarity..::..Tf(Single).)CopyC# sqrt(freq) | |
Tf(Int32) | Computes a score factor based on a term or phrase's frequency in a
document. This value is multiplied by the {@link #Idf(Term, Searcher)}
factor for each term in the query and these products are then summed to
form the initial score for a document.
Terms and phrases repeated in a document indicate the topic of the
document, so implementations of this method usually return larger values
when (Inherited from Similarity.)CopyC# freq CopyC# freq | |
ToString | (Inherited from Object.) |