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 ofSortedSetDocValuesFacetCounts. You must ensure the originalIndexReaderpassed 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 IndexReaderreaderIndexReaderpassed 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)Deprecated.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Accountable>getChildResources()Returns nested resources of this class.Iterable<String>getDims()Returns a list of all dimensionsSortedSetDocValuesReaderState.DimTreegetDimTree(String dim)Returns mapping from prefix toSortedSetDocValuesReaderState.DimTreeSortedSetDocValuesgetDocValues()Return top-level doc values.FacetsConfiggetFacetsConfig()Returns the associated facet config.StringgetField()Indexed field we are reading.SortedSetDocValuesReaderState.OrdRangegetOrdRange(String dim)Returns theSortedSetDocValuesReaderState.OrdRangefor this dimension.Map<String,SortedSetDocValuesReaderState.OrdRange>getPrefixToOrdRange()Returns mapping from prefix toSortedSetDocValuesReaderState.OrdRange.IndexReadergetReader()Returns top-level index reader.intgetSize()Number of unique labels.longramBytesUsed()Return the memory usage of this object in bytes.StringtoString()
-
-
-
Field Detail
-
reader
public final IndexReader reader
IndexReaderpassed to the constructor.
-
-
Constructor Detail
-
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 public DefaultSortedSetDocValuesReaderState(IndexReader reader) throws IOException
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 Detail
-
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
-
getDocValues
public SortedSetDocValues getDocValues() throws IOException
Return top-level doc values.- Specified by:
getDocValuesin classSortedSetDocValuesReaderState- Throws:
IOException
-
getField
public String getField()
Indexed field we are reading.- Specified by:
getFieldin classSortedSetDocValuesReaderState
-
getReader
public IndexReader 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
public FacetsConfig getFacetsConfig()
Description copied from class:SortedSetDocValuesReaderStateReturns the associated facet config.- Specified by:
getFacetsConfigin classSortedSetDocValuesReaderState
-
getDims
public Iterable<String> getDims()
Description copied from class:SortedSetDocValuesReaderStateReturns a list of all dimensions- Specified by:
getDimsin classSortedSetDocValuesReaderState
-
getPrefixToOrdRange
public Map<String,SortedSetDocValuesReaderState.OrdRange> getPrefixToOrdRange()
Description copied from class:SortedSetDocValuesReaderStateReturns mapping from prefix toSortedSetDocValuesReaderState.OrdRange.- Specified by:
getPrefixToOrdRangein classSortedSetDocValuesReaderState
-
getOrdRange
public SortedSetDocValuesReaderState.OrdRange getOrdRange(String dim)
Description copied from class:SortedSetDocValuesReaderStateReturns theSortedSetDocValuesReaderState.OrdRangefor this dimension.- Specified by:
getOrdRangein classSortedSetDocValuesReaderState
-
getDimTree
public SortedSetDocValuesReaderState.DimTree getDimTree(String dim)
Description copied from class:SortedSetDocValuesReaderStateReturns mapping from prefix toSortedSetDocValuesReaderState.DimTree- Specified by:
getDimTreein classSortedSetDocValuesReaderState
-
-