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.OrdRange
-
-
Field Summary
Fields Modifier and Type Field Description IndexReaderreaderIndexReaderpassed to the constructor.
-
Constructor Summary
Constructors Constructor Description DefaultSortedSetDocValuesReaderState(IndexReader reader)Creates this, pulling doc values from the defaultFacetsConfig.DEFAULT_INDEX_FIELD_NAME.DefaultSortedSetDocValuesReaderState(IndexReader reader, String field)Creates this, pulling doc values from the specified field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Accountable>getChildResources()Returns nested resources of this class.SortedSetDocValuesgetDocValues()Return top-level doc values.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) throws IOException
Creates this, pulling doc values from the defaultFacetsConfig.DEFAULT_INDEX_FIELD_NAME.- Throws:
IOException
-
DefaultSortedSetDocValuesReaderState
public DefaultSortedSetDocValuesReaderState(IndexReader reader, String field) 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
-
getPrefixToOrdRange
public Map<String,SortedSetDocValuesReaderState.OrdRange> getPrefixToOrdRange()
Returns mapping from prefix toSortedSetDocValuesReaderState.OrdRange.- Specified by:
getPrefixToOrdRangein classSortedSetDocValuesReaderState
-
getOrdRange
public SortedSetDocValuesReaderState.OrdRange getOrdRange(String dim)
Returns theSortedSetDocValuesReaderState.OrdRangefor this dimension.- Specified by:
getOrdRangein classSortedSetDocValuesReaderState
-
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
-
-