Package org.apache.lucene.codecs.hnsw
Class FlatVectorsFormat
java.lang.Object
org.apache.lucene.codecs.KnnVectorsFormat
org.apache.lucene.codecs.hnsw.FlatVectorsFormat
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
- Direct Known Subclasses:
Lucene102BinaryQuantizedVectorsFormat
,Lucene99FlatVectorsFormat
,Lucene99ScalarQuantizedVectorsFormat
Encodes/decodes per-document vectors and provides a scoring interface for the flat stored vectors
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from class org.apache.lucene.codecs.KnnVectorsFormat
DEFAULT_MAX_DIMENSIONS, EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract FlatVectorsReader
fieldsReader
(SegmentReadState state) Returns aKnnVectorsReader
to read the vectors from the index.abstract FlatVectorsWriter
fieldsWriter
(SegmentWriteState state) Returns aFlatVectorsWriter
to write the vectors to the index.int
getMaxDimensions
(String fieldName) Returns the maximum number of vector dimensions supported by this codec for the given field nameMethods inherited from class org.apache.lucene.codecs.KnnVectorsFormat
availableKnnVectorsFormats, forName, getName, reloadKnnVectorsFormat
-
Constructor Details
-
FlatVectorsFormat
Sole constructor
-
-
Method Details
-
fieldsWriter
Returns aFlatVectorsWriter
to write the vectors to the index.- Specified by:
fieldsWriter
in classKnnVectorsFormat
- Throws:
IOException
-
fieldsReader
Returns aKnnVectorsReader
to read the vectors from the index.- Specified by:
fieldsReader
in classKnnVectorsFormat
- Throws:
IOException
-
getMaxDimensions
Description copied from class:KnnVectorsFormat
Returns the maximum number of vector dimensions supported by this codec for the given field nameCodecs implement this method to specify the maximum number of dimensions they support.
- Specified by:
getMaxDimensions
in classKnnVectorsFormat
- Parameters:
fieldName
- the field name- Returns:
- the maximum number of vector dimensions.
-