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
| Improve this Doc View SourceBasicStats(String, Single)
Constructor. Sets the query boost.
Declaration
public BasicStats(string field, float queryBoost)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | |
System.Single | queryBoost |
Fields
| Improve this Doc View Sourcem_avgFieldLength
The average field length.
Declaration
protected float m_avgFieldLength
Field Value
Type | Description |
---|---|
System.Single |
m_docFreq
The document frequency.
Declaration
protected long m_docFreq
Field Value
Type | Description |
---|---|
System.Int64 |
m_numberOfDocuments
The number of documents.
Declaration
protected long m_numberOfDocuments
Field Value
Type | Description |
---|---|
System.Int64 |
m_numberOfFieldTokens
The total number of tokens in the field.
Declaration
protected long m_numberOfFieldTokens
Field Value
Type | Description |
---|---|
System.Int64 |
m_queryBoost
Query's inner boost.
Declaration
protected readonly float m_queryBoost
Field Value
Type | Description |
---|---|
System.Single |
m_topLevelBoost
Any outer query's boost.
Declaration
protected float m_topLevelBoost
Field Value
Type | Description |
---|---|
System.Single |
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 |
---|---|
System.Single |
m_totalTermFreq
The total number of occurrences of this term across all documents.
Declaration
protected long m_totalTermFreq
Field Value
Type | Description |
---|---|
System.Int64 |
Properties
| Improve this Doc View SourceAvgFieldLength
Returns the average field length.
Declaration
public virtual float AvgFieldLength { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
DocFreq
Returns the document frequency.
Declaration
public virtual long DocFreq { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Field
The field.
Declaration
public string Field { get; }
Property Value
Type | Description |
---|---|
System.String |
NumberOfDocuments
Gets or Sets the number of documents.
Declaration
public virtual long NumberOfDocuments { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
NumberOfFieldTokens
Returns the total number of tokens in the field.
Declaration
public virtual long NumberOfFieldTokens { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
See Also
| Improve this Doc View SourceTotalBoost
Returns the total boost.
Declaration
public virtual float TotalBoost { get; }
Property Value
Type | Description |
---|---|
System.Single |
TotalTermFreq
Returns the total number of occurrences of this term across all documents.
Declaration
public virtual long TotalTermFreq { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
| Improve this Doc View SourceGetValueForNormalization()
The square of the raw normalization value.
Declaration
public override float GetValueForNormalization()
Returns
Type | Description |
---|---|
System.Single |
Overrides
See Also
| Improve this Doc View SourceNormalize(Single, Single)
No normalization is done. topLevelBoost
is saved in the object,
however.
Declaration
public override void Normalize(float queryNorm, float topLevelBoost)
Parameters
Type | Name | Description |
---|---|---|
System.Single | queryNorm | |
System.Single | topLevelBoost |
Overrides
| Improve this Doc View SourceRawNormalizationValue()
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(Single, Single), etc.
Declaration
protected virtual float RawNormalizationValue()
Returns
Type | Description |
---|---|
System.Single |