Class BufferingKnnVectorsWriter.FieldWriter<T>

    • Field Detail

      • fieldInfo

        private final FieldInfo fieldInfo
      • dim

        private final int dim
      • vectors

        private final java.util.List<T> vectors
      • lastDocID

        private int lastDocID
    • Constructor Detail

      • FieldWriter

        FieldWriter​(FieldInfo fieldInfo)
    • Method Detail

      • addValue

        public final void addValue​(int docID,
                                   T value)
        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<T>
      • copyValue

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

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