Package org.apache.lucene.util.quantization

# Class QuantizedByteVectorValues

java.lang.Object
org.apache.lucene.index.KnnVectorValues
org.apache.lucene.index.ByteVectorValues
org.apache.lucene.util.quantization.QuantizedByteVectorValues

All Implemented Interfaces:
  `HasIndexSlice`

Direct Known Subclasses:
  `OffHeapQuantizedByteVectorValues`

public abstract class QuantizedByteVectorValues extends ByteVectorValues implements HasIndexSlice
A version of `ByteVectorValues`, but additionally retrieving score correction offset for Scalar quantization scores.

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.index.KnnVectorValues

  `KnnVectorValues.DocIndexIterator`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QuantizedByteVectorValues()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `QuantizedByteVectorValues`
  `copy()`
  Creates a new copy of this `KnnVectorValues`.
  `ScalarQuantizer`
  `getScalarQuantizer()`
  `abstract float`
  `getScoreCorrectionConstant(int ord)`
  `IndexInput`
  `getSlice()`
  Returns an IndexInput from which to read this instance's values.
  `VectorScorer`
  `scorer(float[] query)`
  Return a `VectorScorer` for the given query vector.

  ### Methods inherited from class org.apache.lucene.index.ByteVectorValues

  `checkField, fromBytes, getEncoding, scorer, vectorValue`

  ### Methods inherited from class org.apache.lucene.index.KnnVectorValues

  `createDenseIterator, createSparseIterator, dimension, fromDISI, getAcceptOrds, getVectorByteLength, iterator, ordToDoc, size`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### QuantizedByteVectorValues

    public QuantizedByteVectorValues()

- ## Method Details

  - ### getScalarQuantizer

    public ScalarQuantizer getScalarQuantizer()

  - ### getScoreCorrectionConstant

    public abstract float getScoreCorrectionConstant(int ord) throws IOException
    Throws:
      `IOException`

  - ### scorer

    public VectorScorer scorer(float[] query) throws IOException
    Return a `VectorScorer` for the given query vector.
    Parameters:
      `query` - the query vector
    Returns:
      a `VectorScorer` instance or null
    Throws:
      `IOException`

  - ### copy

    public QuantizedByteVectorValues copy() throws IOException
    Description copied from class: `KnnVectorValues`
    Creates a new copy of this `KnnVectorValues`. This is helpful when you need to access different values at once, to avoid overwriting the underlying vector returned.
    Specified by:
      `copy` in class `ByteVectorValues`
    Throws:
      `IOException`

  - ### getSlice

    public IndexInput getSlice()
    Description copied from interface: `HasIndexSlice`
    Returns an IndexInput from which to read this instance's values.
    Specified by:
      `getSlice` in interface `HasIndexSlice`