Module org.elasticsearch.server
Class ES816HnswBinaryQuantizedVectorsFormat
java.lang.Object
org.apache.lucene.codecs.KnnVectorsFormat
org.elasticsearch.index.codec.vectors.AbstractHnswVectorsFormat
org.elasticsearch.index.codec.vectors.es816.ES816HnswBinaryQuantizedVectorsFormat
- All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI
Copied from Lucene, replace with Lucene's implementation sometime after Lucene 10
-
Field Summary
FieldsFields inherited from class org.elasticsearch.index.codec.vectors.AbstractHnswVectorsFormat
beamWidth, maxConn, mergeExec, numMergeWorkersFields inherited from class org.apache.lucene.codecs.KnnVectorsFormat
DEFAULT_MAX_DIMENSIONS, EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a format using default graph construction parametersES816HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth) Constructs a format using the given graph construction parameters.ES816HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth, int numMergeWorkers, ExecutorService mergeExec) Constructs a format using the given graph construction parameters and scalar quantization. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.codecs.KnnVectorsReaderfieldsReader(org.apache.lucene.index.SegmentReadState state) org.apache.lucene.codecs.KnnVectorsWriterfieldsWriter(org.apache.lucene.index.SegmentWriteState state) protected org.apache.lucene.codecs.hnsw.FlatVectorsFormatMethods inherited from class org.elasticsearch.index.codec.vectors.AbstractHnswVectorsFormat
getMaxDimensions, toStringMethods inherited from class org.apache.lucene.codecs.KnnVectorsFormat
availableKnnVectorsFormats, forName, getName, reloadKnnVectorsFormat
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
ES816HnswBinaryQuantizedVectorsFormat
public ES816HnswBinaryQuantizedVectorsFormat()Constructs a format using default graph construction parameters -
ES816HnswBinaryQuantizedVectorsFormat
public ES816HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth) Constructs a format using the given graph construction parameters.- Parameters:
maxConn- the maximum number of connections to a node in the HNSW graphbeamWidth- the size of the queue maintained during graph construction.
-
ES816HnswBinaryQuantizedVectorsFormat
public ES816HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth, int numMergeWorkers, ExecutorService mergeExec) Constructs a format using the given graph construction parameters and scalar quantization.- Parameters:
maxConn- the maximum number of connections to a node in the HNSW graphbeamWidth- the size of the queue maintained during graph construction.numMergeWorkers- number of workers (threads) that will be used when doing merge. If larger than 1, a non-nullExecutorServicemust be passed as mergeExecmergeExec- theExecutorServicethat will be used by ALL vector writers that are generated by this format to do the merge
-
-
Method Details
-
flatVectorsFormat
protected org.apache.lucene.codecs.hnsw.FlatVectorsFormat flatVectorsFormat()- Specified by:
flatVectorsFormatin classAbstractHnswVectorsFormat
-
fieldsWriter
public org.apache.lucene.codecs.KnnVectorsWriter fieldsWriter(org.apache.lucene.index.SegmentWriteState state) throws IOException - Specified by:
fieldsWriterin classorg.apache.lucene.codecs.KnnVectorsFormat- Throws:
IOException
-
fieldsReader
public org.apache.lucene.codecs.KnnVectorsReader fieldsReader(org.apache.lucene.index.SegmentReadState state) throws IOException - Specified by:
fieldsReaderin classorg.apache.lucene.codecs.KnnVectorsFormat- Throws:
IOException
-