Class DefaultSortedSetDocValuesReaderState
java.lang.Object
org.apache.lucene.facet.sortedset.SortedSetDocValuesReaderState
org.apache.lucene.facet.sortedset.DefaultSortedSetDocValuesReaderState
- All Implemented Interfaces:
Accountable
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 inherited from class org.apache.lucene.facet.sortedset.SortedSetDocValuesReaderState
INVALID_ORDINAL
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
ConstructorDescriptionDeprecated.Users should explicitly provide facet configuration during instantiation.DefaultSortedSetDocValuesReaderState
(IndexReader reader, String field) Deprecated.Users should explicitly provide facet configuration during instantiation.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 defaultFacetsConfig.DEFAULT_INDEX_FIELD_NAME
. -
Method Summary
Modifier and TypeMethodDescriptionReturns nested resources of this class.getDims()
Returns a list of all dimensionsgetDimTree
(String dim) Returns mapping from prefix toSortedSetDocValuesReaderState.DimTree
Return top-level doc values.Returns the associated facet config.getField()
Indexed field we are reading.getOrdRange
(String dim) Returns theSortedSetDocValuesReaderState.OrdRange
for this dimension.Returns mapping from prefix toSortedSetDocValuesReaderState.OrdRange
.Returns top-level index reader.int
getSize()
Number of unique labels.long
Return the memory usage of this object in bytes.toString()
-
Field Details
-
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 defaultFacetsConfig.DEFAULT_INDEX_FIELD_NAME
.- Throws:
IOException
-
DefaultSortedSetDocValuesReaderState
Deprecated.Users should explicitly provide facet configuration during instantiation. SeeDefaultSortedSetDocValuesReaderState(IndexReader, FacetsConfig)
. To maintain all existing behavior, a "default" facet configuration can be provided withFacetsConfig()
.Creates this without a config, pulling doc values from the defaultFacetsConfig.DEFAULT_INDEX_FIELD_NAME
.- Throws:
IOException
-
DefaultSortedSetDocValuesReaderState
@Deprecated public DefaultSortedSetDocValuesReaderState(IndexReader reader, String field) throws IOException Deprecated.Users should explicitly provide facet configuration during instantiation. SeeDefaultSortedSetDocValuesReaderState(IndexReader, String, FacetsConfig)
. To maintain all existing behavior, a "default" facet configuration can be provided withFacetsConfig()
.Creates this without a config, pulling doc values from the specified field.- 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
Returns nested resources of this class. The result should be a point-in-time snapshot (to avoid race conditions).- See Also:
-
toString
-
getDocValues
Return top-level doc values.- Specified by:
getDocValues
in classSortedSetDocValuesReaderState
- Throws:
IOException
-
getField
Indexed field we are reading.- Specified by:
getField
in classSortedSetDocValuesReaderState
-
getReader
Description copied from class:SortedSetDocValuesReaderState
Returns top-level index reader.- Specified by:
getReader
in classSortedSetDocValuesReaderState
-
getSize
public int getSize()Number of unique labels.- Specified by:
getSize
in classSortedSetDocValuesReaderState
-
getFacetsConfig
Description copied from class:SortedSetDocValuesReaderState
Returns the associated facet config.- Specified by:
getFacetsConfig
in classSortedSetDocValuesReaderState
-
getDims
Description copied from class:SortedSetDocValuesReaderState
Returns a list of all dimensions- Specified by:
getDims
in classSortedSetDocValuesReaderState
-
getPrefixToOrdRange
Description copied from class:SortedSetDocValuesReaderState
Returns mapping from prefix toSortedSetDocValuesReaderState.OrdRange
.- Specified by:
getPrefixToOrdRange
in classSortedSetDocValuesReaderState
-
getOrdRange
Description copied from class:SortedSetDocValuesReaderState
Returns theSortedSetDocValuesReaderState.OrdRange
for this dimension.- Specified by:
getOrdRange
in classSortedSetDocValuesReaderState
-
getDimTree
Description copied from class:SortedSetDocValuesReaderState
Returns mapping from prefix toSortedSetDocValuesReaderState.DimTree
- Specified by:
getDimTree
in classSortedSetDocValuesReaderState
-