Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Similarity.SimWeight

    Stores the weight for a query across the indexed collection. this abstract implementation is empty; descendants of Similarity should subclass Similarity.SimWeight and define the statistics they require in the subclass. Examples include idf, average field length, etc.

    Inheritance
    object
    Similarity.SimWeight
    BasicStats
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Similarities
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class Similarity.SimWeight

    Constructors

    SimWeight()

    Sole constructor. (For invocation by subclass constructors, typically implicit.)

    Declaration
    protected SimWeight()

    Methods

    GetValueForNormalization()

    The value for normalization of contained query clauses (e.g. sum of squared weights).

    NOTE: a Similarity implementation might not use any query normalization at all, its not required. However, if it wants to participate in query normalization, it can return a value here.
    Declaration
    public abstract float GetValueForNormalization()
    Returns
    Type Description
    float

    Normalize(float, float)

    Assigns the query normalization factor and boost from parent queries to this.

    NOTE: a Similarity implementation might not use this normalized value at all, its not required. However, its usually a good idea to at least incorporate the topLevelBoost (e.g. from an outer BooleanQuery) into its score.
    Declaration
    public abstract void Normalize(float queryNorm, float topLevelBoost)
    Parameters
    Type Name Description
    float queryNorm
    float topLevelBoost
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.