Package org.apache.lucene.facet

## Class StringDocValuesReaderState

- java.lang.Object
- - org.apache.lucene.facet.StringDocValuesReaderState

-     public class StringDocValuesReaderState
      extends Object

  Stores an `OrdinalMap` created for a specific `IndexReader` (`reader`) + `field`. Enables re-use of the `ordinalMap` once created since creation is costly.

  Note: It's important that callers confirm the ordinal map is still valid for their cases. Specifically, callers should confirm that the reader used to create the map (`reader`) matches their use-case.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StringDocValuesReaderState​(IndexReader reader, String field)` | Construct state specific to a reader + field.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### StringDocValuesReaderState

          public StringDocValuesReaderState​(IndexReader reader,
                                            String field)
                                     throws IOException

      Construct state specific to a reader + field. This builds an `OrdinalMap` that can be reused for mapping segment-specific ordinals to global ordinals for the given field. Keep in mind that the state is only valid for the specified `IndexReader`, so opening new readers (e.g., to pickup NRT updates) requires constructing a new state instance.
      Throws:
        `IOException`

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`