MutablePointTreeReaderUtils

Utility APIs for sorting and partitioning buffered points.

Functions

Link copied to clipboard
fun partition(config: BKDConfig, maxDoc: Int, splitDim: Int, commonPrefixLen: Int, reader: MutablePointTree, from: Int, to: Int, mid: Int, scratch1: BytesRef, scratch2: BytesRef)

Partition points around mid. All values on the left must be less than or equal to it and all values on the right must be greater than or equal to it.

Link copied to clipboard
fun sort(config: BKDConfig, maxDoc: Int, reader: MutablePointTree, from: Int, to: Int)

Sort the given MutablePointTree based on its packed value then doc ID.

Link copied to clipboard
fun sortByDim(config: BKDConfig, sortedDim: Int, commonPrefixLengths: IntArray?, reader: MutablePointTree, from: Int, to: Int, scratch1: BytesRef, scratch2: BytesRef)

Sort points on the given dimension.