Module org.apache.lucene.codecs
Class SimpleTextKnnVectorsFormat
java.lang.Object
org.apache.lucene.codecs.KnnVectorsFormat
org.apache.lucene.codecs.simpletext.SimpleTextKnnVectorsFormat
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
For debugging, curiosity, transparency only!! Do not use this codec in production.
This codec stores all data in a single human-readable text file (_N.vec). You can view this in any text editor, and even edit it to alter your index.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String
Extension of vectors index file(package private) static final String
Extension of vectors data fileFields inherited from class org.apache.lucene.codecs.KnnVectorsFormat
DEFAULT_MAX_DIMENSIONS, EMPTY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfieldsReader
(SegmentReadState state) Returns aKnnVectorsReader
to read the vectors from the index.fieldsWriter
(SegmentWriteState state) Returns aKnnVectorsWriter
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
-
Field Details
-
VECTOR_EXTENSION
Extension of vectors data file- See Also:
-
META_EXTENSION
Extension of vectors index file- See Also:
-
-
Constructor Details
-
SimpleTextKnnVectorsFormat
public SimpleTextKnnVectorsFormat()
-
-
Method Details
-
fieldsWriter
Description copied from class:KnnVectorsFormat
Returns aKnnVectorsWriter
to write the vectors to the index.- Specified by:
fieldsWriter
in classKnnVectorsFormat
- Throws:
IOException
-
fieldsReader
Description copied from class:KnnVectorsFormat
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.
-