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 FlatVectorsReaderfieldsReader(SegmentReadState state) Returns aKnnVectorsReaderto read the vectors from the index.abstract FlatVectorsWriterfieldsWriter(SegmentWriteState state) Returns aFlatVectorsWriterto write the vectors to the index.intgetMaxDimensions(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 aFlatVectorsWriterto write the vectors to the index.- Specified by:
fieldsWriterin classKnnVectorsFormat- Throws:
IOException
-
fieldsReader
Returns aKnnVectorsReaderto read the vectors from the index.- Specified by:
fieldsReaderin classKnnVectorsFormat- Throws:
IOException
-
getMaxDimensions
Description copied from class:KnnVectorsFormatReturns 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:
getMaxDimensionsin classKnnVectorsFormat- Parameters:
fieldName- the field name- Returns:
- the maximum number of vector dimensions.
-