Show / Hide Table of Contents

    Class BasicStats

    Stores all statistics commonly used ranking methods.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    Similarity.SimWeight
    BasicStats
    LMSimilarity.LMStats
    Namespace: Lucene.Net.Search.Similarities
    Assembly: Lucene.Net.dll
    Syntax
    public class BasicStats : Similarity.SimWeight

    Constructors

    | Improve this Doc View Source

    BasicStats(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 Source

    m_avgFieldLength

    The average field length.

    Declaration
    protected float m_avgFieldLength
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    m_docFreq

    The document frequency.

    Declaration
    protected long m_docFreq
    Field Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    m_numberOfDocuments

    The number of documents.

    Declaration
    protected long m_numberOfDocuments
    Field Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    m_numberOfFieldTokens

    The total number of tokens in the field.

    Declaration
    protected long m_numberOfFieldTokens
    Field Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    m_queryBoost

    Query's inner boost.

    Declaration
    protected readonly float m_queryBoost
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    m_topLevelBoost

    Any outer query's boost.

    Declaration
    protected float m_topLevelBoost
    Field Value
    Type Description
    System.Single
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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 Source

    AvgFieldLength

    Returns the average field length.

    Declaration
    public virtual float AvgFieldLength { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    DocFreq

    Returns the document frequency.

    Declaration
    public virtual long DocFreq { get; set; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    Field

    The field.

    Declaration
    public string Field { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    NumberOfDocuments

    Gets or Sets the number of documents.

    Declaration
    public virtual long NumberOfDocuments { get; set; }
    Property Value
    Type Description
    System.Int64
    | Improve this Doc View Source

    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
    SumTotalTermFreq
    | Improve this Doc View Source

    TotalBoost

    Returns the total boost.

    Declaration
    public virtual float TotalBoost { get; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    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 Source

    GetValueForNormalization()

    The square of the raw normalization value.

    Declaration
    public override float GetValueForNormalization()
    Returns
    Type Description
    System.Single
    Overrides
    Similarity.SimWeight.GetValueForNormalization()
    See Also
    RawNormalizationValue()
    | Improve this Doc View Source

    Normalize(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
    Similarity.SimWeight.Normalize(Single, Single)
    | Improve this Doc View Source

    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(Single, Single), etc.

    Declaration
    protected virtual float RawNormalizationValue()
    Returns
    Type Description
    System.Single
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)