java.lang.Object
org.apache.lucene.codecs.KnnVectorsFormat
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
- Direct Known Subclasses:
Lucene90HnswVectorsFormat,Lucene91HnswVectorsFormat,Lucene92HnswVectorsFormat,Lucene94HnswVectorsFormat,Lucene95HnswVectorsFormat,PerFieldKnnVectorsFormat,SimpleTextKnnVectorsFormat
Encodes/decodes per-document vector and any associated indexing structures required to support
nearest-neighbor search
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classThis static holder class prevents classloading deadlock by delaying init of doc values formats until needed. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KnnVectorsFormatEMPTY throws an exception when written.private final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract KnnVectorsReaderfieldsReader(SegmentReadState state) Returns aKnnVectorsReaderto read the vectors from the index.abstract KnnVectorsWriterfieldsWriter(SegmentWriteState state) Returns aKnnVectorsWriterto write the vectors to the index.static KnnVectorsFormatlooks up a format by namegetName()
-
Field Details
-
name
-
EMPTY
EMPTY throws an exception when written. It acts as a sentinel indicating a Codec that does not support vectors.
-
-
Constructor Details
-
KnnVectorsFormat
Sole constructor
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceNamedSPILoader.NamedSPI
-
forName
looks up a format by name -
fieldsWriter
Returns aKnnVectorsWriterto write the vectors to the index.- Throws:
IOException
-
fieldsReader
Returns aKnnVectorsReaderto read the vectors from the index.- Throws:
IOException
-