Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Similarity.SimScorer

    API for scoring "sloppy" queries such as TermQuery, SpanQuery, and PhraseQuery.

    Frequencies are floating-point values: an approximate within-document frequency adjusted for "sloppiness" by ComputeSlopFactor(int).
    Inheritance
    object
    Similarity.SimScorer
    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.SimScorer

    Constructors

    SimScorer()

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

    Declaration
    protected SimScorer()

    Methods

    ComputePayloadFactor(int, int, int, BytesRef)

    Calculate a scoring factor based on the data in the payload.

    Declaration
    public abstract float ComputePayloadFactor(int doc, int start, int end, BytesRef payload)
    Parameters
    Type Name Description
    int doc
    int start
    int end
    BytesRef payload
    Returns
    Type Description
    float

    ComputeSlopFactor(int)

    Computes the amount of a sloppy phrase match, based on an edit distance.

    Declaration
    public abstract float ComputeSlopFactor(int distance)
    Parameters
    Type Name Description
    int distance
    Returns
    Type Description
    float

    Explain(int, Explanation)

    Explain the score for a single document

    Declaration
    public virtual Explanation Explain(int doc, Explanation freq)
    Parameters
    Type Name Description
    int doc

    document id within the inverted index segment

    Explanation freq

    Explanation of how the sloppy term frequency was computed

    Returns
    Type Description
    Explanation

    document's score

    Score(int, float)

    Score a single document

    Declaration
    public abstract float Score(int doc, float freq)
    Parameters
    Type Name Description
    int doc

    document id within the inverted index segment

    float freq

    sloppy term frequency

    Returns
    Type Description
    float

    document's score

    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.