Show / Hide Table of Contents

    Class SpanNearQuery

    Matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.

    Inheritance
    System.Object
    Query
    SpanQuery
    SpanNearQuery
    PayloadNearQuery
    Inherited Members
    SpanQuery.CreateWeight(IndexSearcher)
    Query.Boost
    Query.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Lucene.Net.Search.Spans
    Assembly: Lucene.Net.dll
    Syntax
    public class SpanNearQuery : SpanQuery

    Constructors

    | Improve this Doc View Source

    SpanNearQuery(SpanQuery[], Int32, Boolean)

    Construct a SpanNearQuery. Matches spans matching a span from each clause, with up to slop total unmatched positions between them. * When inOrder is true, the spans from each clause must be * ordered as in clauses.

    Declaration
    public SpanNearQuery(SpanQuery[] clauses, int slop, bool inOrder)
    Parameters
    Type Name Description
    SpanQuery[] clauses

    The clauses to find near each other

    System.Int32 slop

    The slop value

    System.Boolean inOrder

    true if order is important

    | Improve this Doc View Source

    SpanNearQuery(SpanQuery[], Int32, Boolean, Boolean)

    Declaration
    public SpanNearQuery(SpanQuery[] clauses, int slop, bool inOrder, bool collectPayloads)
    Parameters
    Type Name Description
    SpanQuery[] clauses
    System.Int32 slop
    System.Boolean inOrder
    System.Boolean collectPayloads

    Fields

    | Improve this Doc View Source

    m_clauses

    Declaration
    protected readonly IList<SpanQuery> m_clauses
    Field Value
    Type Description
    System.Collections.Generic.IList<SpanQuery>
    | Improve this Doc View Source

    m_field

    Declaration
    protected string m_field
    Field Value
    Type Description
    System.String
    | Improve this Doc View Source

    m_inOrder

    Declaration
    protected bool m_inOrder
    Field Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    m_slop

    Declaration
    protected int m_slop
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    Field

    Declaration
    public override string Field { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SpanQuery.Field
    | Improve this Doc View Source

    IsInOrder

    Return true if matches are required to be in-order.

    Declaration
    public virtual bool IsInOrder { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Slop

    Return the maximum number of intervening unmatched positions permitted.

    Declaration
    public virtual int Slop { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    Clone()

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object
    Overrides
    Query.Clone()
    | Improve this Doc View Source

    Equals(Object)

    Returns true iff

    o
    is equal to this.

    Declaration
    public override bool Equals(object o)
    Parameters
    Type Name Description
    System.Object o
    Returns
    Type Description
    System.Boolean
    Overrides
    Query.Equals(Object)
    | Improve this Doc View Source

    ExtractTerms(ISet<Term>)

    Declaration
    public override void ExtractTerms(ISet<Term> terms)
    Parameters
    Type Name Description
    System.Collections.Generic.ISet<Term> terms
    Overrides
    Query.ExtractTerms(ISet<Term>)
    | Improve this Doc View Source

    GetClauses()

    Return the clauses whose spans are matched.

    Declaration
    public virtual SpanQuery[] GetClauses()
    Returns
    Type Description
    SpanQuery[]
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    Query.GetHashCode()
    | Improve this Doc View Source

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

    Declaration
    public override Spans GetSpans(AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts)
    Parameters
    Type Name Description
    AtomicReaderContext context
    IBits acceptDocs
    System.Collections.Generic.IDictionary<Term, TermContext> termContexts
    Returns
    Type Description
    Spans
    Overrides
    SpanQuery.GetSpans(AtomicReaderContext, IBits, IDictionary<Term, TermContext>)
    | Improve this Doc View Source

    Rewrite(IndexReader)

    Declaration
    public override Query Rewrite(IndexReader reader)
    Parameters
    Type Name Description
    IndexReader reader
    Returns
    Type Description
    Query
    Overrides
    Query.Rewrite(IndexReader)
    | Improve this Doc View Source

    ToString(String)

    Declaration
    public override string ToString(string field)
    Parameters
    Type Name Description
    System.String field
    Returns
    Type Description
    System.String
    Overrides
    Query.ToString(String)

    Extension Methods

    Number.IsNumber(Object)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2019 Licensed to the Apache Software Foundation (ASF)