org.apache.lucene.util.bkd

## Class BKDReader

- java.lang.Object
- - org.apache.lucene.util.bkd.BKDReader

- All Implemented Interfaces:
    Accountable

      public final class BKDReader
      extends Object
      implements Accountable

  Handles intersection of an multi-dimensional shape in byte[] space with a block KD-tree previously written with `BKDWriter`.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BKDReader.IndexTree` Used to walk the in-heap index
    `static class` | `BKDReader.IntersectState` Used to track all state for a single call to `intersect(org.apache.lucene.index.PointValues.IntersectVisitor)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `packedBytesLength`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `estimatePointCount(PointValues.IntersectVisitor visitor)`
    `int` | `getBytesPerDimension()`
    `int` | `getDocCount()`
    `BKDReader.IntersectState` | `getIntersectState(PointValues.IntersectVisitor visitor)` Create a new `BKDReader.IntersectState`
    `byte[]` | `getMaxPackedValue()`
    `byte[]` | `getMinPackedValue()`
    `int` | `getNumDimensions()`
    `long` | `getPointCount()`
    `void` | `intersect(PointValues.IntersectVisitor visitor)`
    `boolean` | `isLeafNode(int nodeID)`
    `long` | `ramBytesUsed()` Return the memory usage of this object in bytes.
    `void` | `visitLeafBlockValues(BKDReader.IndexTree index, BKDReader.IntersectState state)` Visits all docIDs and packed values in a single leaf block

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

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

    - ### Methods inherited from interface org.apache.lucene.util.Accountable

      `getChildResources`

- - ### Field Detail

    - #### packedBytesLength

          protected final int packedBytesLength

  - ### Constructor Detail

    - #### BKDReader

          public BKDReader(IndexInput in)
                    throws IOException

      Caller must pre-seek the provided `IndexInput` to the index location that `BKDWriter.finish(org.apache.lucene.store.IndexOutput)` returned
      Throws:
        `IOException`

  - ### Method Detail

    - #### intersect

          public void intersect(PointValues.IntersectVisitor visitor)
                         throws IOException

      Throws:
        `IOException`

    - #### estimatePointCount

          public long estimatePointCount(PointValues.IntersectVisitor visitor)

    - #### getIntersectState

          public BKDReader.IntersectState getIntersectState(PointValues.IntersectVisitor visitor)

      Create a new `BKDReader.IntersectState`

    - #### visitLeafBlockValues

          public void visitLeafBlockValues(BKDReader.IndexTree index,
                                           BKDReader.IntersectState state)
                                    throws IOException

      Visits all docIDs and packed values in a single leaf block
      Throws:
        `IOException`

    - #### ramBytesUsed

          public long ramBytesUsed()

      Description copied from interface: `Accountable`
      Return the memory usage of this object in bytes. Negative values are illegal.
      Specified by:
        `ramBytesUsed` in interface `Accountable`

    - #### getMinPackedValue

          public byte[] getMinPackedValue()

    - #### getMaxPackedValue

          public byte[] getMaxPackedValue()

    - #### getNumDimensions

          public int getNumDimensions()

    - #### getBytesPerDimension

          public int getBytesPerDimension()

    - #### getPointCount

          public long getPointCount()

    - #### getDocCount

          public int getDocCount()

    - #### isLeafNode

          public boolean isLeafNode(int nodeID)

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.