jruby/docs BETA
Navigation
org.apache.lucene.codecs 40
C BlockTermState
C BufferingKnnVectorsWriter
C Codec
C CodecUtil
C CompetitiveImpactAccumulator
C CompoundDirectory
C CompoundFormat
C DocValuesConsumer
C DocValuesFormat
C DocValuesProducer
C FieldInfosFormat
C FieldsConsumer
C FieldsProducer
C FilterCodec
C Impact
C KnnFieldVectorsWriter
C KnnVectorsFormat
C KnnVectorsReader
C KnnVectorsWriter
C LiveDocsFormat
C MultiLevelSkipListReader
C MultiLevelSkipListWriter
C MutablePointTree
C NormsConsumer
C NormsFormat
C NormsProducer
C PointsFormat
C PointsReader
C PointsWriter
C PostingsFormat
C PostingsReaderBase
C PostingsWriterBase
C PushPostingsWriterBase
C SegmentInfoFormat
C StoredFieldsFormat
C StoredFieldsReader
C StoredFieldsWriter
C TermVectorsFormat
C TermVectorsReader
C TermVectorsWriter
KnnVectorsFormat — members 9
F DEFAULT_MAX_DIMENSIONS() int
F EMPTY() KnnVectorsFormat
M available_knn_vectors_formats() Set<String>
M fields_reader(state) KnnVectorsReader
M fields_writer(state) KnnVectorsWriter
M for_name(name) KnnVectorsFormat
M get_max_dimensions(field_name) int
M name() String
C reload_knn_vectors_format(classloader)

org.apache.lucene.codecs.KnnVectorsFormat

class abstract implements NamedSPILoader.NamedSPI 9 members

Encodes/decodes per-document vector and any associated indexing structures required to support nearest-neighbor search

Constants

constanttypenote
DEFAULT_MAX_DIMENSIONS int The maximum number of vector dimensions
EMPTY KnnVectorsFormat EMPTY throws an exception when written. It acts as a sentinel indicating a Codec that does not support vectors.

Class Methods

available_knn_vectors_formats

Set<String> available_knn_vectors_formats ( )
Java: availableKnnVectorsFormats()

returns a list of all available format names

for_name

KnnVectorsFormat for_name ( String name )
Java: forName(String name)

looks up a format by name

reload_knn_vectors_format

reload_knn_vectors_format ( ClassLoader classloader )
Java: reloadKnnVectorsFormat(ClassLoader classloader)

Reloads the KnnVectorsFormat list from the given ClassLoader.

NOTE: Only new KnnVectorsFormat are added, existing ones are never removed or replaced.

This method is expensive and should only be called for discovery of new KnnVectorsFormat on the given classpath/classloader!

Instance Methods

fields_reader

KnnVectorsReader fields_reader ( SegmentReadState state )
Java: fieldsReader(org.apache.lucene.index.SegmentReadState state)

Returns a KnnVectorsReader to read the vectors from the index.

fields_writer

KnnVectorsWriter fields_writer ( SegmentWriteState state )
Java: fieldsWriter(org.apache.lucene.index.SegmentWriteState state)

Returns a KnnVectorsWriter to write the vectors to the index.

get_max_dimensions

int get_max_dimensions ( String field_name )
Java: getMaxDimensions(String fieldName)

Returns the maximum number of vector dimensions supported by this codec for the given field name

Codecs implement this method to specify the maximum number of dimensions they support.

nametypedescription
field_nameStringthe field name

Returns: the maximum number of vector dimensions.

name

String name ( )
Java: getName() · also: get_name
this work for additional information regarding copyright ownership.