Class SimpleTextKnnVectorsWriter

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class SimpleTextKnnVectorsWriter
    extends KnnVectorsWriter
    Writes vector-valued fields in a plain text format
    • Constructor Detail

      • SimpleTextKnnVectorsWriter

        SimpleTextKnnVectorsWriter​(SegmentWriteState state)
                            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • writeVectorValue

        private void writeVectorValue​(VectorValues vectors)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • writeMeta

        private void writeMeta​(FieldInfo field,
                               long vectorDataOffset,
                               long vectorDataLength,
                               java.util.List<java.lang.Integer> docIds)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • finish

        public void finish()
                    throws java.io.IOException
        Description copied from class: KnnVectorsWriter
        Called once at the end before close
        Specified by:
        finish in class KnnVectorsWriter
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • writeField

        private void writeField​(IndexOutput out,
                                BytesRef fieldName,
                                int value)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeField

        private void writeField​(IndexOutput out,
                                BytesRef fieldName,
                                long value)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeField

        private void writeField​(IndexOutput out,
                                BytesRef fieldName,
                                java.lang.String value)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        private void write​(IndexOutput out,
                           java.lang.String s)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • writeInt

        private void writeInt​(IndexOutput out,
                              int x)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • writeLong

        private void writeLong​(IndexOutput out,
                               long x)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        private void write​(IndexOutput out,
                           BytesRef b)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • newline

        private void newline​(IndexOutput out)
                      throws java.io.IOException
        Throws:
        java.io.IOException