Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SpanWeight

    Expert-only. Public for use by other weight implementations

    Inheritance
    object
    Weight
    SpanWeight
    PayloadNearQuery.PayloadNearSpanWeight
    PayloadTermQuery.PayloadTermWeight
    Inherited Members
    Weight.GetBulkScorer(AtomicReaderContext, bool, IBits)
    Weight.ScoresDocsOutOfOrder
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search.Spans
    Assembly: Lucene.Net.dll
    Syntax
    public class SpanWeight : Weight

    Constructors

    SpanWeight(SpanQuery, IndexSearcher)

    Expert-only. Public for use by other weight implementations

    Declaration
    public SpanWeight(SpanQuery query, IndexSearcher searcher)
    Parameters
    Type Name Description
    SpanQuery query
    IndexSearcher searcher

    Fields

    m_query

    Expert-only. Public for use by other weight implementations

    Declaration
    protected SpanQuery m_query
    Field Value
    Type Description
    SpanQuery

    m_similarity

    Expert-only. Public for use by other weight implementations

    Declaration
    protected Similarity m_similarity
    Field Value
    Type Description
    Similarity

    m_stats

    Expert-only. Public for use by other weight implementations

    Declaration
    protected Similarity.SimWeight m_stats
    Field Value
    Type Description
    Similarity.SimWeight

    m_termContexts

    Expert-only. Public for use by other weight implementations

    Declaration
    protected IDictionary<Term, TermContext> m_termContexts
    Field Value
    Type Description
    IDictionary<Term, TermContext>

    Properties

    Query

    The query that this concerns.

    Declaration
    public override Query Query { get; }
    Property Value
    Type Description
    Query
    Overrides
    Weight.Query

    Methods

    Explain(AtomicReaderContext, int)

    An explanation of the score computation for the named document.

    Declaration
    public override Explanation Explain(AtomicReaderContext context, int doc)
    Parameters
    Type Name Description
    AtomicReaderContext context

    The readers context to create the Explanation for.

    int doc

    The document's id relative to the given context's reader

    Returns
    Type Description
    Explanation

    An Explanation for the score

    Overrides
    Weight.Explain(AtomicReaderContext, int)
    Exceptions
    Type Condition
    IOException

    if an IOException occurs

    GetScorer(AtomicReaderContext, IBits)

    Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

    NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call ScoresDocsOutOfOrder), as some Scorer implementations will always return documents in-order.

    NOTE:null can be returned if no documents will be scored by this query.
    Declaration
    public override Scorer GetScorer(AtomicReaderContext context, IBits acceptDocs)
    Parameters
    Type Name Description
    AtomicReaderContext context

    The AtomicReaderContext for which to return the Scorer.

    IBits acceptDocs

    IBits that represent the allowable docs to match (typically deleted docs but possibly filtering other documents)

    Returns
    Type Description
    Scorer

    A Scorer which scores documents in/out-of order.

    Overrides
    Weight.GetScorer(AtomicReaderContext, IBits)
    Exceptions
    Type Condition
    IOException

    if there is a low-level I/O error

    GetValueForNormalization()

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

    Declaration
    public override float GetValueForNormalization()
    Returns
    Type Description
    float
    Overrides
    Weight.GetValueForNormalization()

    Normalize(float, float)

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

    Declaration
    public override void Normalize(float queryNorm, float topLevelBoost)
    Parameters
    Type Name Description
    float queryNorm
    float topLevelBoost
    Overrides
    Weight.Normalize(float, float)
    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.