Class ES818HnswBinaryQuantizedVectorsFormat

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

public class ES818HnswBinaryQuantizedVectorsFormat extends org.apache.lucene.codecs.KnnVectorsFormat
Copied from Lucene, replace with Lucene's implementation sometime after Lucene 10
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.apache.lucene.codecs.KnnVectorsFormat

    DEFAULT_MAX_DIMENSIONS, EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a format using default graph construction parameters
    ES818HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth)
    Constructs a format using the given graph construction parameters.
    ES818HnswBinaryQuantizedVectorsFormat(int maxConn, int beamWidth, int numMergeWorkers, ExecutorService mergeExec)
    Constructs a format using the given graph construction parameters and scalar quantization.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.codecs.KnnVectorsReader
    fieldsReader(org.apache.lucene.index.SegmentReadState state)
     
    org.apache.lucene.codecs.KnnVectorsWriter
    fieldsWriter(org.apache.lucene.index.SegmentWriteState state)
     
    int
     
     

    Methods inherited from class org.apache.lucene.codecs.KnnVectorsFormat

    availableKnnVectorsFormats, forName, getName, reloadKnnVectorsFormat

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ES818HnswBinaryQuantizedVectorsFormat

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

      public ES818HnswBinaryQuantizedVectorsFormat(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 graph
      beamWidth - the size of the queue maintained during graph construction.
    • ES818HnswBinaryQuantizedVectorsFormat

      public ES818HnswBinaryQuantizedVectorsFormat(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 graph
      beamWidth - 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-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

    • 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
    • getMaxDimensions

      public int getMaxDimensions(String fieldName)
      Overrides:
      getMaxDimensions in class org.apache.lucene.codecs.KnnVectorsFormat
    • toString

      public String toString()
      Overrides:
      toString in class Object