Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SpanPositionCheckQuery

    Base class for filtering a SpanQuery based on the position of a match.

    Inheritance
    object
    Query
    SpanQuery
    SpanPositionCheckQuery
    SpanNearPayloadCheckQuery
    SpanPayloadCheckQuery
    SpanPositionRangeQuery
    Inherited Members
    SpanQuery.CreateWeight(IndexSearcher)
    Query.Boost
    Query.ToString(string)
    Query.ToString()
    Query.Clone()
    Query.GetHashCode()
    Query.Equals(object)
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Search.Spans
    Assembly: Lucene.Net.dll
    Syntax
    public abstract class SpanPositionCheckQuery : SpanQuery

    Constructors

    SpanPositionCheckQuery(SpanQuery)

    Base class for filtering a SpanQuery based on the position of a match.

    Declaration
    protected SpanPositionCheckQuery(SpanQuery match)
    Parameters
    Type Name Description
    SpanQuery match

    Fields

    m_match

    Base class for filtering a SpanQuery based on the position of a match.

    Declaration
    protected SpanQuery m_match
    Field Value
    Type Description
    SpanQuery

    Properties

    Field

    Returns the name of the field matched by this query.

    Note that this may return null if the query matches no terms.
    Declaration
    public override string Field { get; }
    Property Value
    Type Description
    string
    Overrides
    SpanQuery.Field

    Match

    Base class for filtering a SpanQuery based on the position of a match.

    Declaration
    public virtual SpanQuery Match { get; }
    Property Value
    Type Description
    SpanQuery

    The SpanQuery whose matches are filtered.

    Methods

    AcceptPosition(Spans)

    Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.

    This is only called if the underlying MoveNext() for the match is successful
    Declaration
    protected abstract SpanPositionCheckQuery.AcceptStatus AcceptPosition(Spans spans)
    Parameters
    Type Name Description
    Spans spans

    The Spans instance, positioned at the spot to check

    Returns
    Type Description
    SpanPositionCheckQuery.AcceptStatus

    Whether the match is accepted, rejected, or rejected and should move to the next doc.

    See Also
    MoveNext()

    ExtractTerms(ISet<Term>)

    Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten (Rewrite(IndexReader)) form.

    Declaration
    public override void ExtractTerms(ISet<Term> terms)
    Parameters
    Type Name Description
    ISet<Term> terms
    Overrides
    Query.ExtractTerms(ISet<Term>)
    Exceptions
    Type Condition
    InvalidOperationException

    If this query is not yet rewritten

    GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)

    Expert: Returns the matches for this query in an index. Used internally to search for spans.

    Declaration
    public override Spans GetSpans(AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts)
    Parameters
    Type Name Description
    AtomicReaderContext context
    IBits acceptDocs
    IDictionary<Term, TermContext> termContexts
    Returns
    Type Description
    Spans
    Overrides
    SpanQuery.GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)

    Rewrite(IndexReader)

    Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

    Declaration
    public override Query Rewrite(IndexReader reader)
    Parameters
    Type Name Description
    IndexReader reader
    Returns
    Type Description
    Query
    Overrides
    Query.Rewrite(IndexReader)
    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.