## org.apache.lucene.facet.sortedset
Class SortedSetDocValuesReaderState

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

    public final class SortedSetDocValuesReaderState

extends Object

Wraps a `IndexReader` and resolves ords using existing `SortedSetDocValues` APIs without a separate taxonomy index. This only supports flat facets (dimension + label), and it makes faceting a bit slower, adds some cost at reopen time, but avoids managing the separate taxonomy index. It also requires less RAM than the taxonomy index, as it manages the flat (2-level) hierarchy more efficiently. In addition, the tie-break during faceting is now meaningful (in label sorted order).

NOTE: creating an instance of this class is somewhat costly, as it computes per-segment ordinal maps, so you should create it once and re-use that one instance for a given `IndexReader`.

Field Summary
`static String` `FACET_FIELD_EXTENSION` Extension added to `CategoryListParams.field` to determin which field to read/write facet ordinals from/to.

Constructor Summary
`SortedSetDocValuesReaderState(FacetIndexingParams fip, IndexReader reader)` Create an instance, scanning the `SortedSetDocValues` from the provided reader and `FacetIndexingParams`.
`SortedSetDocValuesReaderState(IndexReader reader)` Create an instance, scanning the `SortedSetDocValues` from the provided reader, with default `FacetIndexingParams`.

Method Summary

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FACET_FIELD_EXTENSION

    public static final String FACET_FIELD_EXTENSION

  Extension added to `CategoryListParams.field` to determin which field to read/write facet ordinals from/to.

  See Also:
    Constant Field Values

Constructor Detail

### SortedSetDocValuesReaderState

    public SortedSetDocValuesReaderState(IndexReader reader)
                                  throws IOException

  Create an instance, scanning the `SortedSetDocValues` from the provided reader, with default `FacetIndexingParams`.

  Throws:
    `IOException`

### SortedSetDocValuesReaderState

    public SortedSetDocValuesReaderState(FacetIndexingParams fip,
                                         IndexReader reader)
                                  throws IOException

  Create an instance, scanning the `SortedSetDocValues` from the provided reader and `FacetIndexingParams`.

  Throws:
    `IOException`

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