Module org.elasticsearch.server
Class ES93HnswVectorsFormat
java.lang.Object
org.apache.lucene.codecs.KnnVectorsFormat
org.elasticsearch.index.codec.vectors.AbstractHnswVectorsFormat
org.elasticsearch.index.codec.vectors.es93.ES93HnswVectorsFormat
- All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intFor k=100, we ask by default to search a graph of 100*1.5=150 results.Fields inherited from class org.elasticsearch.index.codec.vectors.AbstractHnswVectorsFormat
beamWidth, DEFAULT_HNSW_GRAPH_THRESHOLD, hnswGraphThreshold, maxConn, mergeExec, numMergeWorkersFields inherited from class org.apache.lucene.codecs.KnnVectorsFormat
DEFAULT_MAX_DIMENSIONS, EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionES93HnswVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType) ES93HnswVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType, int numMergeWorkers, ExecutorService mergeExec) ES93HnswVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType, int numMergeWorkers, ExecutorService mergeExec, int hnswGraphThreshold) ES93HnswVectorsFormat(DenseVectorFieldMapper.ElementType elementType) -
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, resolveThreshold, toStringMethods inherited from class org.apache.lucene.codecs.KnnVectorsFormat
availableKnnVectorsFormats, forName, getName, reloadKnnVectorsFormat
-
Field Details
-
HNSW_GRAPH_THRESHOLD
public static final int HNSW_GRAPH_THRESHOLDFor k=100, we ask by default to search a graph of 100*1.5=150 results. So the threshold is set to 150 to match this expected search cost.- See Also:
-
-
Constructor Details
-
ES93HnswVectorsFormat
public ES93HnswVectorsFormat() -
ES93HnswVectorsFormat
-
ES93HnswVectorsFormat
public ES93HnswVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType) -
ES93HnswVectorsFormat
public ES93HnswVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType, int numMergeWorkers, ExecutorService mergeExec) -
ES93HnswVectorsFormat
public ES93HnswVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType, int numMergeWorkers, ExecutorService mergeExec, int hnswGraphThreshold)
-
-
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
-