Package org.apache.lucene.codecs
Class KnnVectorsWriter
- java.lang.Object
-
- org.apache.lucene.codecs.KnnVectorsWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
Lucene92HnswVectorsWriter
public abstract class KnnVectorsWriter extends Object implements Closeable
Writes vectors to an index.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedKnnVectorsWriter()Sole constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidfinish()Called once at the end before closevoidmerge(MergeState mergeState)Merges the segment vectors for all fields.abstract voidwriteField(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader)Write all values contained in the provided reader
-
-
-
Method Detail
-
writeField
public abstract void writeField(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader) throws IOException
Write all values contained in the provided reader- Throws:
IOException
-
finish
public abstract void finish() throws IOExceptionCalled once at the end before close- Throws:
IOException
-
merge
public void merge(MergeState mergeState) throws IOException
Merges the segment vectors for all fields. This default implementation delegates towriteField(org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.KnnVectorsReader), passing aKnnVectorsReaderthat combines the vector values and ignores deleted documents.- Throws:
IOException
-
-