Package org.apache.lucene.codecs
Class KnnVectorsWriter
java.lang.Object
org.apache.lucene.codecs.KnnVectorsWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
Lucene91HnswVectorsWriter
Writes vectors to an index.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
finish()
Called once at the end before closevoid
merge
(MergeState mergeState) Merges the segment vectors for all fields.abstract void
writeField
(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader) Write all values contained in the provided reader
-
Constructor Details
-
KnnVectorsWriter
protected KnnVectorsWriter()Sole constructor
-
-
Method Details
-
writeField
public abstract void writeField(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader) throws IOException Write all values contained in the provided reader- Throws:
IOException
-
finish
Called once at the end before close- Throws:
IOException
-
merge
Merges the segment vectors for all fields. This default implementation delegates towriteField(org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.KnnVectorsReader)
, passing aKnnVectorsReader
that combines the vector values and ignores deleted documents.- Throws:
IOException
-