• 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(Int32).

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

    Constructors

    | Improve this Doc View Source

    SimScorer()

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

    Declaration
    public SimScorer()

    Methods

    | Improve this Doc View Source

    ComputePayloadFactor(Int32, Int32, Int32, 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
    System.Int32 doc
    System.Int32 start
    System.Int32 end
    BytesRef payload
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    ComputeSlopFactor(Int32)

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

    Declaration
    public abstract float ComputeSlopFactor(int distance)
    Parameters
    Type Name Description
    System.Int32 distance
    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    Explain(Int32, Explanation)

    Explain the score for a single document

    Declaration
    public virtual Explanation Explain(int doc, Explanation freq)
    Parameters
    Type Name Description
    System.Int32 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

    | Improve this Doc View Source

    Score(Int32, Single)

    Score a single document

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

    document id within the inverted index segment

    System.Single freq

    sloppy term frequency

    Returns
    Type Description
    System.Single

    document's score

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)