IntersectVisitor

We recurse the PointTree, using a provided instance of this to guide the recursion.

Inheritors

Functions

Link copied to clipboard
abstract fun compare(minPackedValue: ByteArray, maxPackedValue: ByteArray): PointValues.Relation

Called for non-leaf cells to test how the cell relates to the query, to determine how to further recurse down the tree.

Link copied to clipboard
open fun grow(count: Int)

Notifies the caller that this many documents are about to be visited

Link copied to clipboard
abstract fun visit(docID: Int)

Called for all documents in a leaf cell that's fully contained by the query. The consumer should blindly accept the docID.

open fun visit(iterator: DocIdSetIterator)

Similar to IntersectVisitor.visit, but a bulk visit and implementations may have their optimizations.

open fun visit(ref: IntsRef)

Similar to IntersectVisitor.visit, but a bulk visit and implements may have their optimizations. Even if the implementation does the same thing this method, this may be a speed improvement due to fewer virtual calls.

abstract fun visit(docID: Int, packedValue: ByteArray)

Called for all documents in a leaf cell that crosses the query. The consumer should scrutinize the packedValue to decide whether to accept it. In the 1D case, values are visited in increasing order, and in the case of ties, in increasing docID order.

open fun visit(iterator: DocIdSetIterator, packedValue: ByteArray)

Similar to IntersectVisitor.visit but in this case the packedValue can have more than one docID associated to it. The provided iterator should not escape the scope of this method so that implementations of PointValues are free to reuse it,