C# Class Lucene.Net.Search.DefaultSimilarity

Inheritance: Similarity
Show file Open project: synhershko/lucene.net Class Usage Examples

Protected Properties

Property Type Description
internalDiscountOverlaps bool

Public Methods

Method Description
ComputeNorm ( System field, Lucene.Net.Index.FieldInvertState state ) : float

Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is FieldInvertState.GetLength() if SetDiscountOverlaps is false, else it's FieldInvertState.GetLength() - FieldInvertState.GetNumOverlap() .

WARNING: This API is new and experimental, and may suddenly change.

Coord ( int overlap, int maxOverlap ) : float

Implemented as overlap / maxOverlap.

Idf ( int docFreq, int numDocs ) : float

Implemented as log(numDocs/(docFreq+1)) + 1.

LengthNorm ( System fieldName, int numTerms ) : float

Implemented as 1/sqrt(numTerms).

QueryNorm ( float sumOfSquaredWeights ) : float

Implemented as 1/sqrt(sumOfSquaredWeights).

SloppyFreq ( int distance ) : float

Implemented as 1 / (distance + 1).

Tf ( float freq ) : float

Implemented as sqrt(freq).

Method Details

ComputeNorm() public method

Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is FieldInvertState.GetLength() if SetDiscountOverlaps is false, else it's FieldInvertState.GetLength() - FieldInvertState.GetNumOverlap() .

WARNING: This API is new and experimental, and may suddenly change.

public ComputeNorm ( System field, Lucene.Net.Index.FieldInvertState state ) : float
field System
state Lucene.Net.Index.FieldInvertState
return float

Coord() public method

Implemented as overlap / maxOverlap.
public Coord ( int overlap, int maxOverlap ) : float
overlap int
maxOverlap int
return float

Idf() public method

Implemented as log(numDocs/(docFreq+1)) + 1.
public Idf ( int docFreq, int numDocs ) : float
docFreq int
numDocs int
return float

LengthNorm() public method

Implemented as 1/sqrt(numTerms).
public LengthNorm ( System fieldName, int numTerms ) : float
fieldName System
numTerms int
return float

QueryNorm() public method

Implemented as 1/sqrt(sumOfSquaredWeights).
public QueryNorm ( float sumOfSquaredWeights ) : float
sumOfSquaredWeights float
return float

SloppyFreq() public method

Implemented as 1 / (distance + 1).
public SloppyFreq ( int distance ) : float
distance int
return float

Tf() public method

Implemented as sqrt(freq).
public Tf ( float freq ) : float
freq float
return float

Property Details

internalDiscountOverlaps protected property

protected bool internalDiscountOverlaps
return bool