BKDReader (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.util.bkd, class: BKDReader

Package org.apache.lucene.util.bkd

# Class BKDReader

java.lang.Object
org.apache.lucene.index.PointValues
org.apache.lucene.util.bkd.BKDReader

public class BKDReader extends PointValues
Handles reading a block KD-tree in byte[] space previously written with `BKDWriter`.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.index.PointValues

  `PointValues.IntersectVisitor, PointValues.PointTree, PointValues.Relation`

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.index.PointValues

  `MAX_DIMENSIONS, MAX_INDEX_DIMENSIONS, MAX_NUM_BYTES`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BKDReader(IndexInput metaIn, IndexInput indexIn, IndexInput dataIn)`
  Caller must pre-seek the provided `IndexInput` to the index location that `BKDWriter.finish(org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput)` returned.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getBytesPerDimension()`
  Returns the number of bytes per dimension
  `int`
  `getDocCount()`
  Returns the total number of documents that have indexed at least one point.
  `byte[]`
  `getMaxPackedValue()`
  Returns maximum value for each dimension, packed, or null if `PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)` is `0`
  `byte[]`
  `getMinPackedValue()`
  Returns minimum value for each dimension, packed, or null if `PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)` is `0`
  `int`
  `getNumDimensions()`
  Returns how many dimensions are represented in the values
  `int`
  `getNumIndexDimensions()`
  Returns how many dimensions are used for the index
  `PointValues.PointTree`
  `getPointTree()`
  Create a new `PointValues.PointTree` to navigate the index
  `long`
  `size()`
  Returns the total number of indexed points across all documents.

  ### Methods inherited from class org.apache.lucene.index.PointValues

  `estimateDocCount, estimatePointCount, getDocCount, getMaxPackedValue, getMinPackedValue, intersect, isEstimatedPointCountGreaterThanOrEqualTo, size`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BKDReader

    public BKDReader(IndexInput metaIn, IndexInput indexIn, IndexInput dataIn) throws IOException
    Caller must pre-seek the provided `IndexInput` to the index location that `BKDWriter.finish(org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput, org.apache.lucene.store.IndexOutput)` returned. BKD tree is always stored off-heap.
    Throws:
      `IOException`

- ## Method Details

  - ### getPointTree

    public PointValues.PointTree getPointTree() throws IOException
    Description copied from class: `PointValues`
    Create a new `PointValues.PointTree` to navigate the index
    Specified by:
      `getPointTree` in class `PointValues`
    Throws:
      `IOException`

  - ### getMinPackedValue

    public byte[] getMinPackedValue()
    Description copied from class: `PointValues`
    Returns minimum value for each dimension, packed, or null if `PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)` is `0`
    Specified by:
      `getMinPackedValue` in class `PointValues`

  - ### getMaxPackedValue

    public byte[] getMaxPackedValue()
    Description copied from class: `PointValues`
    Returns maximum value for each dimension, packed, or null if `PointValues.size(org.apache.lucene.index.IndexReader, java.lang.String)` is `0`
    Specified by:
      `getMaxPackedValue` in class `PointValues`

  - ### getNumDimensions

    public int getNumDimensions() throws IOException
    Description copied from class: `PointValues`
    Returns how many dimensions are represented in the values
    Specified by:
      `getNumDimensions` in class `PointValues`
    Throws:
      `IOException`

  - ### getNumIndexDimensions

    public int getNumIndexDimensions() throws IOException
    Description copied from class: `PointValues`
    Returns how many dimensions are used for the index
    Specified by:
      `getNumIndexDimensions` in class `PointValues`
    Throws:
      `IOException`

  - ### getBytesPerDimension

    public int getBytesPerDimension() throws IOException
    Description copied from class: `PointValues`
    Returns the number of bytes per dimension
    Specified by:
      `getBytesPerDimension` in class `PointValues`
    Throws:
      `IOException`

  - ### size

    public long size()
    Description copied from class: `PointValues`
    Returns the total number of indexed points across all documents.
    Specified by:
      `size` in class `PointValues`

  - ### getDocCount

    public int getDocCount()
    Description copied from class: `PointValues`
    Returns the total number of documents that have indexed at least one point.
    Specified by:
      `getDocCount` in class `PointValues`