org.apache.lucene.facet.taxonomy

## Class CachedOrdinalsReader.CachedOrds

- java.lang.Object
- - org.apache.lucene.facet.taxonomy.CachedOrdinalsReader.CachedOrds

- All Implemented Interfaces:
    Accountable
  Enclosing class:
    CachedOrdinalsReader

      public static final class CachedOrdinalsReader.CachedOrds
      extends Object
      implements Accountable

  Holds the cached ordinals in two parallel `int[]` arrays.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int[]` | `offsets` Index into `ordinals` for each document.
    `int[]` | `ordinals` Holds ords for all docs.

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

      `NULL_ACCOUNTABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CachedOrds(OrdinalsReader.OrdinalsSegmentReader source, int maxDoc)` Creates a new `CachedOrdinalsReader.CachedOrds` from the `BinaryDocValues`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `ramBytesUsed()`

    - ### 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

    - #### offsets

          public final int[] offsets

      Index into `ordinals` for each document.

    - #### ordinals

          public final int[] ordinals

      Holds ords for all docs.

  - ### Constructor Detail

    - #### CachedOrds

          public CachedOrds(OrdinalsReader.OrdinalsSegmentReader source,
                            int maxDoc)
                     throws IOException

      Creates a new `CachedOrdinalsReader.CachedOrds` from the `BinaryDocValues`. Assumes that the `BinaryDocValues` is not `null`.
      Throws:
        `IOException`

  - ### Method Detail

    - #### ramBytesUsed

          public long ramBytesUsed()

      Specified by:
        `ramBytesUsed` in interface `Accountable`

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