Class ES93HnswBinaryQuantizedVectorsFormat

java.lang.Object
org.apache.lucene.codecs.KnnVectorsFormat
org.elasticsearch.index.codec.vectors.AbstractHnswVectorsFormat
org.elasticsearch.index.codec.vectors.es93.ES93HnswBinaryQuantizedVectorsFormat
All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI

public class ES93HnswBinaryQuantizedVectorsFormat extends AbstractHnswVectorsFormat
  • Field Details

  • Constructor Details

    • ES93HnswBinaryQuantizedVectorsFormat

      public ES93HnswBinaryQuantizedVectorsFormat()
      Constructs a format using default graph construction parameters
    • ES93HnswBinaryQuantizedVectorsFormat

      public ES93HnswBinaryQuantizedVectorsFormat(DenseVectorFieldMapper.ElementType elementType, boolean useDirectIO)
      Constructs a format using the given graph construction parameters.
      Parameters:
      useDirectIO - whether to use direct IO when reading raw vectors
    • ES93HnswBinaryQuantizedVectorsFormat

      public ES93HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType, boolean useDirectIO)
      Constructs a format using the given graph construction parameters.
      Parameters:
      maxConn - the maximum number of connections to a node in the HNSW graph
      beamWidth - the size of the queue maintained during graph construction.
      useDirectIO - whether to use direct IO when reading raw vectors
    • ES93HnswBinaryQuantizedVectorsFormat

      public ES93HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth, DenseVectorFieldMapper.ElementType elementType, boolean useDirectIO, 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 graph
      beamWidth - the size of the queue maintained during graph construction.
      useDirectIO - whether to use direct IO when reading raw vectors
      numMergeWorkers - number of workers (threads) that will be used when doing merge. If larger than 1, a non-null ExecutorService must be passed as mergeExec
      mergeExec - the ExecutorService that 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:
      flatVectorsFormat in class AbstractHnswVectorsFormat
    • fieldsWriter

      public org.apache.lucene.codecs.KnnVectorsWriter fieldsWriter(org.apache.lucene.index.SegmentWriteState state) throws IOException
      Specified by:
      fieldsWriter in class org.apache.lucene.codecs.KnnVectorsFormat
      Throws:
      IOException
    • fieldsReader

      public org.apache.lucene.codecs.KnnVectorsReader fieldsReader(org.apache.lucene.index.SegmentReadState state) throws IOException
      Specified by:
      fieldsReader in class org.apache.lucene.codecs.KnnVectorsFormat
      Throws:
      IOException