Class SortedNumericDocValuesWriterWrapper

java.lang.Object
org.apache.lucene.index.SortedNumericDocValuesWriterWrapper

public class SortedNumericDocValuesWriterWrapper extends Object
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

    Constructors
    Constructor
    Description
    SortedNumericDocValuesWriterWrapper(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.util.Counter counter)
    Sole constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addValue(int docID, long value)
    Adds a value to the sorted numeric doc values for the specified document.
    org.apache.lucene.index.SortedNumericDocValues
    Returns the SortedNumericDocValues instance containing the sorted numeric doc values

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SortedNumericDocValuesWriterWrapper

      public SortedNumericDocValuesWriterWrapper(org.apache.lucene.index.FieldInfo fieldInfo, org.apache.lucene.util.Counter counter)
      Sole constructor. Constructs a new SortedNumericDocValuesWriterWrapper instance.
      Parameters:
      fieldInfo - the field information for the field being written
      counter - 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 ID
      value - the value to add
    • getDocValues

      public org.apache.lucene.index.SortedNumericDocValues getDocValues()
      Returns the SortedNumericDocValues instance containing the sorted numeric doc values
      Returns:
      the SortedNumericDocValues instance