The SimilarityDelegator type exposes the following members.

Constructors

  NameDescription
Public methodSimilarityDelegator
Construct a {@link Similarity} that delegates all methods to another.

Methods

  NameDescription
Public methodComputeNorm (Overrides Similarity..::..ComputeNorm(String, FieldInvertState).)
Public methodCoord (Overrides Similarity..::..Coord(Int32, Int32).)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIdf(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.)
Public methodIdf(Int32, Int32) (Overrides Similarity..::..Idf(Int32, Int32).)
Public methodIdf(Term, Searcher) Obsolete.
Computes a score factor for a simple term.

The default implementation is:

            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.
(Inherited from Similarity.)
Public methodidfExplain
Computes a score factor for a phrase.

The default implementation sums the idf factor for each term in the phrase.

(Inherited from Similarity.)
Public methodIdfExplain
Computes a score factor for a simple term and returns an explanation for that score factor.

The default implementation uses:

            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.
(Inherited from Similarity.)
Public methodLengthNorm (Overrides Similarity..::..LengthNorm(String, Int32).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodQueryNorm (Overrides Similarity..::..QueryNorm(Single).)
Public methodScorePayload(String, array<Byte>[]()[][], Int32, Int32) Obsolete. (Overrides Similarity..::..ScorePayload(String, array<Byte>[]()[][], Int32, Int32).)
Public methodScorePayload(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.)
Public methodSloppyFreq (Overrides Similarity..::..SloppyFreq(Int32).)
Public methodTf(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

CopyC#
freq
is large, and smaller values when
CopyC#
freq
is small.

The default implementation calls {@link #Tf(float)}.

(Inherited from Similarity.)
Public methodTf(Single) (Overrides Similarity..::..Tf(Single).)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

See Also