Class Lucene99ScalarQuantizedVectorsWriter.FieldWriter

java.lang.Object
org.apache.lucene.codecs.KnnFieldVectorsWriter<float[]>
org.apache.lucene.codecs.hnsw.FlatFieldVectorsWriter<float[]>
org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorsWriter.FieldWriter
All Implemented Interfaces:
Accountable
Enclosing class:
Lucene99ScalarQuantizedVectorsWriter

static class Lucene99ScalarQuantizedVectorsWriter.FieldWriter extends FlatFieldVectorsWriter<float[]>
  • Field Details

    • SHALLOW_SIZE

      private static final long SHALLOW_SIZE
    • floatVectors

      private final List<float[]> floatVectors
    • fieldInfo

      private final FieldInfo fieldInfo
    • confidenceInterval

      private final Float confidenceInterval
    • bits

      private final byte bits
    • compress

      private final boolean compress
    • infoStream

      private final InfoStream infoStream
    • normalize

      private final boolean normalize
    • minQuantile

      private float minQuantile
    • maxQuantile

      private float maxQuantile
    • finished

      private boolean finished
    • docsWithField

      private final DocsWithFieldSet docsWithField
  • Constructor Details

  • Method Details

    • finish

      void finish() throws IOException
      Throws:
      IOException
    • createQuantizer

      ScalarQuantizer createQuantizer()
    • ramBytesUsed

      public long ramBytesUsed()
      Description copied from interface: Accountable
      Return the memory usage of this object in bytes. Negative values are illegal.
    • addValue

      public void addValue(int docID, float[] vectorValue) throws IOException
      Description copied from class: KnnFieldVectorsWriter
      Add new docID with its vector value to the given field for indexing. Doc IDs must be added in increasing order.
      Specified by:
      addValue in class KnnFieldVectorsWriter<float[]>
      Throws:
      IOException
    • copyValue

      public float[] copyValue(float[] vectorValue)
      Description copied from class: KnnFieldVectorsWriter
      Used to copy values being indexed to internal storage.
      Specified by:
      copyValue in class KnnFieldVectorsWriter<float[]>
      Parameters:
      vectorValue - an array containing the vector value to add
      Returns:
      a copy of the value; a new array