Class BasicStats
Stores all statistics commonly used ranking methods.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Search.Similarities
Assembly: Lucene.Net.dll
Syntax
public class BasicStats : Similarity.SimWeight
Constructors
BasicStats(string, float)
Constructor. Sets the query boost.
Declaration
public BasicStats(string field, float queryBoost)
Parameters
Type | Name | Description |
---|---|---|
string | field | |
float | queryBoost |
Fields
m_avgFieldLength
The average field length.
Declaration
protected float m_avgFieldLength
Field Value
Type | Description |
---|---|
float |
m_docFreq
The document frequency.
Declaration
protected long m_docFreq
Field Value
Type | Description |
---|---|
long |
m_numberOfDocuments
The number of documents.
Declaration
protected long m_numberOfDocuments
Field Value
Type | Description |
---|---|
long |
m_numberOfFieldTokens
The total number of tokens in the field.
Declaration
protected long m_numberOfFieldTokens
Field Value
Type | Description |
---|---|
long |
m_queryBoost
Query's inner boost.
Declaration
protected readonly float m_queryBoost
Field Value
Type | Description |
---|---|
float |
m_topLevelBoost
Any outer query's boost.
Declaration
protected float m_topLevelBoost
Field Value
Type | Description |
---|---|
float |
m_totalBoost
For most Similarities, the immediate and the top level query boosts are not handled differently. Hence, this field is just the product of the other two.
Declaration
protected float m_totalBoost
Field Value
Type | Description |
---|---|
float |
m_totalTermFreq
The total number of occurrences of this term across all documents.
Declaration
protected long m_totalTermFreq
Field Value
Type | Description |
---|---|
long |
Properties
AvgFieldLength
Returns the average field length.
Declaration
public virtual float AvgFieldLength { get; set; }
Property Value
Type | Description |
---|---|
float |
DocFreq
Returns the document frequency.
Declaration
public virtual long DocFreq { get; set; }
Property Value
Type | Description |
---|---|
long |
Field
The field.
Declaration
public string Field { get; }
Property Value
Type | Description |
---|---|
string |
NumberOfDocuments
Gets or Sets the number of documents.
Declaration
public virtual long NumberOfDocuments { get; set; }
Property Value
Type | Description |
---|---|
long |
NumberOfFieldTokens
Returns the total number of tokens in the field.
Declaration
public virtual long NumberOfFieldTokens { get; set; }
Property Value
Type | Description |
---|---|
long |
See Also
TotalBoost
Returns the total boost.
Declaration
public virtual float TotalBoost { get; }
Property Value
Type | Description |
---|---|
float |
TotalTermFreq
Returns the total number of occurrences of this term across all documents.
Declaration
public virtual long TotalTermFreq { get; set; }
Property Value
Type | Description |
---|---|
long |
Methods
GetValueForNormalization()
The square of the raw normalization value.
Declaration
public override float GetValueForNormalization()
Returns
Type | Description |
---|---|
float |
Overrides
See Also
Normalize(float, float)
No normalization is done. topLevelBoost
is saved in the object,
however.
Declaration
public override void Normalize(float queryNorm, float topLevelBoost)
Parameters
Type | Name | Description |
---|---|---|
float | queryNorm | |
float | topLevelBoost |
Overrides
RawNormalizationValue()
Computes the raw normalization value. This basic implementation returns the query boost. Subclasses may override this method to include other factors (such as idf), or to save the value for inclusion in Normalize(float, float), etc.
Declaration
protected virtual float RawNormalizationValue()
Returns
Type | Description |
---|---|
float |