Class KnnFieldVectorsWriter<T>

  • Type Parameters:
    T - an array type; the type of vectors to be written
    All Implemented Interfaces:
    Accountable

    public abstract class KnnFieldVectorsWriter<T>
    extends Object
    implements Accountable
    Vectors' writer for a field
    • Constructor Detail

      • KnnFieldVectorsWriter

        protected KnnFieldVectorsWriter()
        Sole constructor
    • Method Detail

      • addValue

        public abstract void addValue​(int docID,
                                      Object vectorValue)
                               throws IOException
        Add new docID with its vector value to the given field for indexing. Doc IDs must be added in increasing order.
        Throws:
        IOException
      • copyValue

        public abstract T copyValue​(T vectorValue)
        Used to copy values being indexed to internal storage.
        Parameters:
        vectorValue - an array containing the vector value to add
        Returns:
        a copy of the value; a new array