Package org.apache.lucene.index
Class SortedNumericDocValuesWriterWrapper
java.lang.Object
org.apache.lucene.index.SortedNumericDocValuesWriterWrapper
A wrapper class for writing sorted numeric doc values.
This class provides a convenient way to add sorted numeric doc values to a field
and retrieve the corresponding SortedNumericDocValues
instance.
- Opensearch.experimental:
-
Constructor Summary
ConstructorDescriptionSortedNumericDocValuesWriterWrapper
(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.util.Counter counter) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue
(int docID, long value) Adds a value to the sorted numeric doc values for the specified document.org.apache.lucene.index.SortedNumericDocValues
Returns theSortedNumericDocValues
instance containing the sorted numeric doc values
-
Constructor Details
-
SortedNumericDocValuesWriterWrapper
public SortedNumericDocValuesWriterWrapper(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.util.Counter counter) Sole constructor. Constructs a newSortedNumericDocValuesWriterWrapper
instance.- Parameters:
fieldInfo
- the field information for the field being writtencounter
- a counter for tracking memory usage
-
-
Method Details
-
addValue
public void addValue(int docID, long value) Adds a value to the sorted numeric doc values for the specified document.- Parameters:
docID
- the document IDvalue
- the value to add
-
getDocValues
public org.apache.lucene.index.SortedNumericDocValues getDocValues()Returns theSortedNumericDocValues
instance containing the sorted numeric doc values- Returns:
- the
SortedNumericDocValues
instance
-