org.apache.lucene.facet.sortedset

## Class DefaultSortedSetDocValuesReaderState

- java.lang.Object
- - org.apache.lucene.facet.sortedset.SortedSetDocValuesReaderState
  - - org.apache.lucene.facet.sortedset.DefaultSortedSetDocValuesReaderState

- All Implemented Interfaces:
    Accountable

      public class DefaultSortedSetDocValuesReaderState
      extends SortedSetDocValuesReaderState

  Default implementation of `SortedSetDocValuesFacetCounts`. You must ensure the original `IndexReader` passed to the constructor is not closed whenever you use this class!

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.facet.sortedset.SortedSetDocValuesReaderState

      `SortedSetDocValuesReaderState.OrdRange`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IndexReader` | `reader` `IndexReader` passed to the constructor.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSortedSetDocValuesReaderState(IndexReader reader)` Creates this, pulling doc values from the default `FacetsConfig.DEFAULT_INDEX_FIELD_NAME`.
    `DefaultSortedSetDocValuesReaderState(IndexReader reader, String field)` Creates this, pulling doc values from the specified field.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<Accountable>` | `getChildResources()` Returns nested resources of this class.
    `SortedSetDocValues` | `getDocValues()` Return top-level doc values.
    `String` | `getField()` Indexed field we are reading.
    `SortedSetDocValuesReaderState.OrdRange` | `getOrdRange(String dim)` Returns the `SortedSetDocValuesReaderState.OrdRange` for this dimension.
    `Map<String,SortedSetDocValuesReaderState.OrdRange>` | `getPrefixToOrdRange()` Returns mapping from prefix to `SortedSetDocValuesReaderState.OrdRange`.
    `IndexReader` | `getReader()` Returns top-level index reader.
    `int` | `getSize()` Number of unique labels.
    `long` | `ramBytesUsed()` Return the memory usage of this object in bytes.
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### reader

          public final IndexReader reader

      `IndexReader` passed to the constructor.

  - ### Constructor Detail

    - #### DefaultSortedSetDocValuesReaderState

          public DefaultSortedSetDocValuesReaderState(IndexReader reader)
                                               throws IOException

      Creates this, pulling doc values from the default `FacetsConfig.DEFAULT_INDEX_FIELD_NAME`.
      Throws:
        `IOException`

    - #### DefaultSortedSetDocValuesReaderState

          public DefaultSortedSetDocValuesReaderState(IndexReader reader,
                                                      String field)
                                               throws IOException

      Creates this, pulling doc values from the specified field.
      Throws:
        `IOException`

  - ### Method Detail

    - #### ramBytesUsed

          public long ramBytesUsed()

      Return the memory usage of this object in bytes. Negative values are illegal.

    - #### getChildResources

          public Collection<Accountable> getChildResources()

      Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).
      See Also:
        `Accountables`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getDocValues

          public SortedSetDocValues getDocValues()
                                          throws IOException

      Return top-level doc values.
      Specified by:
        `getDocValues` in class `SortedSetDocValuesReaderState`
      Throws:
        `IOException`

    - #### getPrefixToOrdRange

          public Map<String,SortedSetDocValuesReaderState.OrdRange> getPrefixToOrdRange()

      Returns mapping from prefix to `SortedSetDocValuesReaderState.OrdRange`.
      Specified by:
        `getPrefixToOrdRange` in class `SortedSetDocValuesReaderState`

    - #### getOrdRange

          public SortedSetDocValuesReaderState.OrdRange getOrdRange(String dim)

      Returns the `SortedSetDocValuesReaderState.OrdRange` for this dimension.
      Specified by:
        `getOrdRange` in class `SortedSetDocValuesReaderState`

    - #### getField

          public String getField()

      Indexed field we are reading.
      Specified by:
        `getField` in class `SortedSetDocValuesReaderState`

    - #### getReader

          public IndexReader getReader()

      Description copied from class: `SortedSetDocValuesReaderState`
      Returns top-level index reader.
      Specified by:
        `getReader` in class `SortedSetDocValuesReaderState`

    - #### getSize

          public int getSize()

      Number of unique labels.
      Specified by:
        `getSize` in class `SortedSetDocValuesReaderState`

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