Class PerFieldKnnVectorsFormat.FieldsWriter
java.lang.Object
org.apache.lucene.codecs.KnnVectorsWriter
org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat.FieldsWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- PerFieldKnnVectorsFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<KnnVectorsFormat,
PerFieldKnnVectorsFormat.WriterAndSuffix> private final SegmentWriteState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
finish()
Called once at the end before closeprivate KnnVectorsWriter
getInstance
(FieldInfo field) final void
merge
(MergeState mergeState) Merges the segment vectors for all fields.void
writeField
(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader) Write all values contained in the provided reader
-
Field Details
-
formats
-
suffixes
-
segmentWriteState
-
-
Constructor Details
-
FieldsWriter
FieldsWriter(SegmentWriteState segmentWriteState)
-
-
Method Details
-
writeField
Description copied from class:KnnVectorsWriter
Write all values contained in the provided reader- Specified by:
writeField
in classKnnVectorsWriter
- Throws:
IOException
-
merge
Description copied from class:KnnVectorsWriter
Merges the segment vectors for all fields. This default implementation delegates toKnnVectorsWriter.writeField(org.apache.lucene.index.FieldInfo, org.apache.lucene.codecs.KnnVectorsReader)
, passing aKnnVectorsReader
that combines the vector values and ignores deleted documents.- Overrides:
merge
in classKnnVectorsWriter
- Throws:
IOException
-
finish
Description copied from class:KnnVectorsWriter
Called once at the end before close- Specified by:
finish
in classKnnVectorsWriter
- Throws:
IOException
-
close
- Throws:
IOException
-
getInstance
- Throws:
IOException
-