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
FieldsFields inherited from class org.apache.lucene.facet.sortedset.SortedSetDocValuesReaderState
INVALID_ORDINALFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSortedSetDocValuesReaderState(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.DimTreeReturn top-level doc values.Returns the associated facet config.getField()Indexed field we are reading.getOrdRange(String dim) Returns theSortedSetDocValuesReaderState.OrdRangefor this dimension.Returns mapping from prefix toSortedSetDocValuesReaderState.OrdRange.Returns top-level index reader.intgetSize()Number of unique labels.longReturn the memory usage of this object in bytes.toString()
-
Field Details
-
reader
IndexReaderpassed 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
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:
getDocValuesin classSortedSetDocValuesReaderState- Throws:
IOException
-
getField
Indexed field we are reading.- Specified by:
getFieldin classSortedSetDocValuesReaderState
-
getReader
Description copied from class:SortedSetDocValuesReaderStateReturns top-level index reader.- Specified by:
getReaderin classSortedSetDocValuesReaderState
-
getSize
public int getSize()Number of unique labels.- Specified by:
getSizein classSortedSetDocValuesReaderState
-
getFacetsConfig
Description copied from class:SortedSetDocValuesReaderStateReturns the associated facet config.- Specified by:
getFacetsConfigin classSortedSetDocValuesReaderState
-
getDims
Description copied from class:SortedSetDocValuesReaderStateReturns a list of all dimensions- Specified by:
getDimsin classSortedSetDocValuesReaderState
-
getPrefixToOrdRange
Description copied from class:SortedSetDocValuesReaderStateReturns mapping from prefix toSortedSetDocValuesReaderState.OrdRange.- Specified by:
getPrefixToOrdRangein classSortedSetDocValuesReaderState
-
getOrdRange
Description copied from class:SortedSetDocValuesReaderStateReturns theSortedSetDocValuesReaderState.OrdRangefor this dimension.- Specified by:
getOrdRangein classSortedSetDocValuesReaderState
-
getDimTree
Description copied from class:SortedSetDocValuesReaderStateReturns mapping from prefix toSortedSetDocValuesReaderState.DimTree- Specified by:
getDimTreein classSortedSetDocValuesReaderState
-