public abstract class SortedSetDocValuesReaderState
extends java.lang.Object
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
SortedSetDocValuesReaderState.OrdRange
Holds start/end range of ords, which maps to one
dimension (someday we may generalize it to map to
hierarchies within one dimension).
|
| Modifier | Constructor and Description |
|---|---|
protected |
SortedSetDocValuesReaderState()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SortedSetDocValues |
getDocValues()
Return top-level doc values.
|
abstract java.lang.String |
getField()
Indexed field we are reading.
|
abstract SortedSetDocValuesReaderState.OrdRange |
getOrdRange(java.lang.String dim)
Returns the
SortedSetDocValuesReaderState.OrdRange for this dimension. |
abstract java.util.Map<java.lang.String,SortedSetDocValuesReaderState.OrdRange> |
getPrefixToOrdRange()
Returns mapping from prefix to
SortedSetDocValuesReaderState.OrdRange. |
abstract IndexReader |
getReader()
Returns top-level index reader.
|
abstract int |
getSize()
Number of unique labels.
|
protected SortedSetDocValuesReaderState()
public abstract SortedSetDocValues getDocValues()
throws java.io.IOException
java.io.IOExceptionpublic abstract java.lang.String getField()
public abstract SortedSetDocValuesReaderState.OrdRange getOrdRange(java.lang.String dim)
SortedSetDocValuesReaderState.OrdRange for this dimension.public abstract java.util.Map<java.lang.String,SortedSetDocValuesReaderState.OrdRange> getPrefixToOrdRange()
SortedSetDocValuesReaderState.OrdRange.public abstract IndexReader getReader()
public abstract int getSize()
Data In Motion GmbH all rights reserved