Package 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.DimTree, SortedSetDocValuesReaderState.OrdRange`

## Field Summary

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

### Fields inherited from class org.apache.lucene.facet.sortedset.SortedSetDocValuesReaderState

`INVALID_ORDINAL`

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

`NULL_ACCOUNTABLE`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`Collection<Accountable>`
`getChildResources()`
Returns nested resources of this class.
`Iterable<String>`
`getDims()`
Returns a list of all dimensions
`SortedSetDocValuesReaderState.DimTree`
`getDimTree(String dim)`
Returns mapping from prefix to `SortedSetDocValuesReaderState.DimTree`
`SortedSetDocValues`
`getDocValues()`
Return top-level doc values.
`FacetsConfig`
`getFacetsConfig()`
Returns the associated facet config.
`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 Details

### reader

public final IndexReader reader
`IndexReader` passed to the constructor.

## Constructor Details

### DefaultSortedSetDocValuesReaderState

public DefaultSortedSetDocValuesReaderState(IndexReader reader, FacetsConfig config) throws IOException
Creates this with a config, pulling doc values from the default `FacetsConfig.DEFAULT_INDEX_FIELD_NAME`.

Throws:
  `IOException`

### DefaultSortedSetDocValuesReaderState

public DefaultSortedSetDocValuesReaderState(IndexReader reader, String field, FacetsConfig config) throws IOException
Creates this, pulling doc values from the specified field.

Throws:
  `IOException`

## Method Details

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

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

### getFacetsConfig

public FacetsConfig getFacetsConfig()
Description copied from class: `SortedSetDocValuesReaderState`
Returns the associated facet config.

Specified by:
  `getFacetsConfig` in class `SortedSetDocValuesReaderState`

### getDims

public Iterable<String> getDims()
Description copied from class: `SortedSetDocValuesReaderState`
Returns a list of all dimensions

Specified by:
  `getDims` in class `SortedSetDocValuesReaderState`

### getPrefixToOrdRange

public Map<String,SortedSetDocValuesReaderState.OrdRange> getPrefixToOrdRange()
Description copied from class: `SortedSetDocValuesReaderState`
Returns mapping from prefix to `SortedSetDocValuesReaderState.OrdRange`.

Specified by:
  `getPrefixToOrdRange` in class `SortedSetDocValuesReaderState`

### getOrdRange

public SortedSetDocValuesReaderState.OrdRange getOrdRange(String dim)
Description copied from class: `SortedSetDocValuesReaderState`
Returns the `SortedSetDocValuesReaderState.OrdRange` for this dimension.

Specified by:
  `getOrdRange` in class `SortedSetDocValuesReaderState`

### getDimTree

public SortedSetDocValuesReaderState.DimTree getDimTree(String dim)
Description copied from class: `SortedSetDocValuesReaderState`
Returns mapping from prefix to `SortedSetDocValuesReaderState.DimTree`

Specified by:
  `getDimTree` in class `SortedSetDocValuesReaderState`