IntervalIterator

A DocIdSetIterator that also allows iteration over matching intervals in a document.

Once the iterator is positioned on a document by calling [advance] or [nextDoc], intervals may be retrieved by calling [nextInterval] until [NO_MORE_INTERVALS] is returned.

The limits of the current interval are returned by [start] and [end]. When the iterator has been moved to a new document, but before [nextInterval] has been called, both these methods return `-1`.

Note that it is possible for a document to return [NO_MORE_INTERVALS] on the first call to [nextInterval]

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun advance(target: Int): Int
Link copied to clipboard
abstract fun cost(): Long
Link copied to clipboard
abstract fun docID(): Int
Link copied to clipboard
abstract fun end(): Int

The end of the current interval

Link copied to clipboard
abstract fun gaps(): Int

The number of gaps within the current interval

Link copied to clipboard
open fun intoBitSet(upTo: Int, bitSet: FixedBitSet, offset: Int)
Link copied to clipboard
abstract fun matchCost(): Float

An indication of the average cost of iterating over all intervals in a document

Link copied to clipboard
abstract fun nextDoc(): Int
Link copied to clipboard
abstract fun nextInterval(): Int

Advance the iterator to the next interval

Link copied to clipboard
abstract fun start(): Int

The start of the current interval

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

The width of the current interval