NearSpansOrdered

class NearSpansOrdered(allowedSlop: Int, subSpans: List<Spans>) : ConjunctionSpans

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

Constructors

Link copied to clipboard
constructor(allowedSlop: Int, subSpans: List<Spans>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun advance(target: Int): Int
Link copied to clipboard

Optional method: Return a TwoPhaseIterator view of this Spans. A return value of null indicates that two-phase iteration is not supported.

Link copied to clipboard
open override fun collect(collector: SpanCollector)

Collect postings data from the leaves of the current Spans.

Link copied to clipboard
open override fun cost(): Long
Link copied to clipboard
open override fun docID(): Int
Link copied to clipboard
open override fun endPosition(): Int

Returns the end position for the current start position, or -1 when nextStartPosition was not yet called on the current doc. After the last start/end position at the current doc this returns NO_MORE_POSITIONS.

Link copied to clipboard
Link copied to clipboard
open fun intoBitSet(upTo: Int, bitSet: FixedBitSet, offset: Int)
Link copied to clipboard
open override fun nextDoc(): Int
Link copied to clipboard
open override fun nextStartPosition(): Int

Returns the next start position for the current doc. There is always at least one start/end position per doc. After the last start/end position at the current doc this returns NO_MORE_POSITIONS.

Link copied to clipboard
open override fun positionsCost(): Float

Return an estimation of the cost of using the positions of this Spans for any single document.

Link copied to clipboard
open override fun startPosition(): Int

Returns the start position in the current doc, or -1 when nextStartPosition was not yet called on the current doc. After the last start/end position at the current doc this returns NO_MORE_POSITIONS.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun width(): Int

Return the width of the match, which is typically used to sloppy freq.