Show / Hide Table of Contents

    Class NearSpansOrdered

    A Spans that is formed from the ordered subspans of a SpanNearQuery where the subspans do not overlap and have a maximum slop between them.

    The formed spans only contains minimum slop matches.

    The matching slop is computed from the distance(s) between the non overlapping matching Spans.

    Successive matches are always formed from the successive Spans of the SpanNearQuery.

    The formed spans may contain overlaps when the slop is at least 1. For example, when querying using t1 t2 t3 with slop at least 1, the fragment: t1 t2 t1 t3 t2 t3 matches twice: t1 t2 .. t3 t1 .. t2 t3

    Expert: Only public for subclassing. Most implementations should not need this class

    Inheritance
    System.Object
    Spans
    NearSpansOrdered
    Namespace: Lucene.Net.Search.Spans
    Assembly: Lucene.Net.dll
    Syntax
    public class NearSpansOrdered : Spans

    Constructors

    | Improve this Doc View Source

    NearSpansOrdered(SpanNearQuery, AtomicReaderContext, IBits, IDictionary<Term, TermContext>)

    Declaration
    public NearSpansOrdered(SpanNearQuery spanNearQuery, AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts)
    Parameters
    Type Name Description
    SpanNearQuery spanNearQuery
    AtomicReaderContext context
    IBits acceptDocs
    IDictionary<Term, TermContext> termContexts
    | Improve this Doc View Source

    NearSpansOrdered(SpanNearQuery, AtomicReaderContext, IBits, IDictionary<Term, TermContext>, Boolean)

    Declaration
    public NearSpansOrdered(SpanNearQuery spanNearQuery, AtomicReaderContext context, IBits acceptDocs, IDictionary<Term, TermContext> termContexts, bool collectPayloads)
    Parameters
    Type Name Description
    SpanNearQuery spanNearQuery
    AtomicReaderContext context
    IBits acceptDocs
    IDictionary<Term, TermContext> termContexts
    System.Boolean collectPayloads

    Properties

    | Improve this Doc View Source

    Doc

    Returns the document number of the current match. Initially invalid.

    Declaration
    public override int Doc { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Spans.Doc
    | Improve this Doc View Source

    End

    Returns the end position of the current match. Initially invalid.

    Declaration
    public override int End { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Spans.End
    | Improve this Doc View Source

    IsPayloadAvailable

    Declaration
    public override bool IsPayloadAvailable { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    Spans.IsPayloadAvailable
    | Improve this Doc View Source

    Start

    Returns the start position of the current match. Initially invalid.

    Declaration
    public override int Start { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    Spans.Start
    | Improve this Doc View Source

    SubSpans

    Declaration
    public virtual Spans[] SubSpans { get; }
    Property Value
    Type Description
    Spans[]

    Methods

    | Improve this Doc View Source

    GetCost()

    Declaration
    public override long GetCost()
    Returns
    Type Description
    System.Int64
    Overrides
    Spans.GetCost()
    | Improve this Doc View Source

    GetPayload()

    Declaration
    public override ICollection<byte[]> GetPayload()
    Returns
    Type Description
    ICollection<System.Byte[]>
    Overrides
    Spans.GetPayload()
    | Improve this Doc View Source

    Next()

    Move to the next match, returning true iff any such exists.

    Declaration
    public override bool Next()
    Returns
    Type Description
    System.Boolean
    Overrides
    Spans.Next()
    | Improve this Doc View Source

    SkipTo(Int32)

    Skips to the first match beyond the current, whose document number is greater than or equal to target.

    The behavior of this method is undefined when called with target <= current, or after the iterator has exhausted. Both cases may result in unpredicted behavior.

    Returns true if there is such a match.

    Behaves as if written:

        bool SkipTo(int target) 
        {
            do 
            {
                if (!Next())
                    return false;
            } while (target > Doc);
            return true;
        }

    Most implementations are considerably more efficient than that.

    Declaration
    public override bool SkipTo(int target)
    Parameters
    Type Name Description
    System.Int32 target
    Returns
    Type Description
    System.Boolean
    Overrides
    Spans.SkipTo(Int32)
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)