DocBaseBitSetIterator

A DocIdSetIterator like BitSetIterator but has a doc base in order to avoid storing previous 0s.

Constructors

Link copied to clipboard
constructor(bits: FixedBitSet, cost: Long, docBase: Int)

Properties

Link copied to clipboard

Get the FixedBitSet. A docId will exist in this DocIdSetIterator if the bitset contains the (docId - .getDocBase)

Link copied to clipboard

Get the docBase. It is guaranteed that docBase is a multiple of 64.

Functions

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

Advances to the first beyond the current whose document number is greater than or equal to target, and returns the document number itself. Exhausts the iterator and returns .NO_MORE_DOCS if target is greater than the highest document number in the set.

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

Returns the estimated cost of this DocIdSetIterator.

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

Returns the following:

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

Load doc IDs into a FixedBitSet. This should behave exactly as if implemented as below, which is the default implementation:

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

Advances to the next document in the set and returns the doc it is currently on, or .NO_MORE_DOCS if there are no more docs in the set.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.