Class OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues

java.lang.Object
org.apache.lucene.index.KnnVectorValues
org.apache.lucene.index.ByteVectorValues
org.apache.lucene.util.quantization.QuantizedByteVectorValues
org.elasticsearch.index.codec.vectors.OffHeapQuantizedByteVectorValues
org.elasticsearch.index.codec.vectors.OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues
All Implemented Interfaces:
org.apache.lucene.codecs.lucene95.HasIndexSlice
Enclosing class:
OffHeapQuantizedByteVectorValues

public static class OffHeapQuantizedByteVectorValues.DenseOffHeapVectorValues extends OffHeapQuantizedByteVectorValues
Dense vector values that are stored off-heap. This is the most common case when every doc has a vector.
  • Constructor Details

    • DenseOffHeapVectorValues

      public DenseOffHeapVectorValues(int dimension, int size, org.apache.lucene.util.quantization.ScalarQuantizer scalarQuantizer, boolean compress, org.apache.lucene.index.VectorSimilarityFunction similarityFunction, org.apache.lucene.codecs.hnsw.FlatVectorsScorer vectorsScorer, org.apache.lucene.store.IndexInput slice)
      Create dense off-heap vector values
      Parameters:
      dimension - vector dimension
      size - number of vectors
      scalarQuantizer - the scalar quantizer
      compress - whether the vectors are compressed
      similarityFunction - the similarity function
      vectorsScorer - the vectors scorer
      slice - the index input slice containing the vector data
  • Method Details

    • copy

      Overrides:
      copy in class org.apache.lucene.util.quantization.QuantizedByteVectorValues
      Throws:
      IOException
    • getAcceptOrds

      public org.apache.lucene.util.Bits getAcceptOrds(org.apache.lucene.util.Bits acceptDocs)
      Overrides:
      getAcceptOrds in class org.apache.lucene.index.KnnVectorValues
    • scorer

      public org.apache.lucene.search.VectorScorer scorer(float[] target) throws IOException
      Overrides:
      scorer in class org.apache.lucene.util.quantization.QuantizedByteVectorValues
      Throws:
      IOException
    • iterator

      public org.apache.lucene.index.KnnVectorValues.DocIndexIterator iterator()
      Overrides:
      iterator in class org.apache.lucene.index.KnnVectorValues