Lucene102BinaryQuantizedVectorsReader (Lucene 10.5.1 backward-codecs API)
Description: declaration: package: org.apache.lucene.backward_codecs.lucene102, class: Lucene102BinaryQuantizedVectorsReader

Package org.apache.lucene.backward_codecs.lucene102

# Class Lucene102BinaryQuantizedVectorsReader

java.lang.Object
org.apache.lucene.codecs.KnnVectorsReader
org.apache.lucene.codecs.hnsw.FlatVectorsReader
org.apache.lucene.backward_codecs.lucene102.Lucene102BinaryQuantizedVectorsReader

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `Accountable`, `QuantizedVectorsReader`

public class Lucene102BinaryQuantizedVectorsReader extends FlatVectorsReader implements QuantizedVectorsReader
Reader for binary quantized vectors in the Lucene 10.2 format.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static final class`
  `Lucene102BinaryQuantizedVectorsReader.BinarizedVectorValues`
  Binarized vector values holding row and quantized vector values

- ## Field Summary

  ### Fields inherited from interface org.apache.lucene.util.Accountable

  `NULL_ACCOUNTABLE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Lucene102BinaryQuantizedVectorsReader(SegmentReadState state, FlatVectorsReader rawVectorsReader, Lucene102BinaryFlatVectorsScorer vectorsScorer)`
  Creates a new reader for binary quantized vectors.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkIntegrity()`
  `void`
  `close()`
  `ByteVectorValues`
  `getByteVectorValues(String field)`
  `FlatVectorsScorer`
  `getFlatVectorScorer(String field)`
  `Lucene102BinaryQuantizedVectorsReader.BinarizedVectorValues`
  `getFloatVectorValues(String field)`
  `Map<String,Long>`
  `getOffHeapByteSize(FieldInfo fieldInfo)`
  `ScalarQuantizer`
  `getQuantizationState(String fieldName)`
  `BaseQuantizedByteVectorValues`
  `getQuantizedVectorValues(String fieldName)`
  `RandomVectorScorer`
  `getRandomVectorScorer(String field, byte[] target)`
  `RandomVectorScorer`
  `getRandomVectorScorer(String field, float[] target)`
  `CloseableRandomVectorScorerSupplier`
  `getRandomVectorScorerSupplierForMerge(FieldInfo fieldInfo, SegmentWriteState segmentWriteState)`
  `long`
  `ramBytesUsed()`
  `void`
  `search(String field, byte[] target, KnnCollector knnCollector, AcceptDocs acceptDocs)`
  `void`
  `search(String field, float[] target, KnnCollector knnCollector, AcceptDocs acceptDocs)`

  ### Methods inherited from class org.apache.lucene.codecs.hnsw.FlatVectorsReader

  `getMergeInstance`

  ### Methods inherited from class org.apache.lucene.codecs.KnnVectorsReader

  `finishMerge, mergeOffHeapByteSizeMaps`

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

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

  ### Methods inherited from interface org.apache.lucene.util.Accountable

  `getChildResources`

- ## Constructor Details

  - ### Lucene102BinaryQuantizedVectorsReader

    public Lucene102BinaryQuantizedVectorsReader(SegmentReadState state, FlatVectorsReader rawVectorsReader, Lucene102BinaryFlatVectorsScorer vectorsScorer) throws IOException
    Creates a new reader for binary quantized vectors.
    Parameters:
      `state` - the segment read state
      `rawVectorsReader` - the reader for the raw (non-quantized) vectors
      `vectorsScorer` - the scorer for binary quantized vectors
    Throws:
      `IOException` - if an I/O error occurs

- ## Method Details

  - ### getFlatVectorScorer

    public FlatVectorsScorer getFlatVectorScorer(String field) throws IOException
    Specified by:
      `getFlatVectorScorer` in class `FlatVectorsReader`
    Throws:
      `IOException`

  - ### getRandomVectorScorer

    public RandomVectorScorer getRandomVectorScorer(String field, float[] target) throws IOException
    Specified by:
      `getRandomVectorScorer` in class `FlatVectorsReader`
    Throws:
      `IOException`

  - ### getRandomVectorScorer

    public RandomVectorScorer getRandomVectorScorer(String field, byte[] target) throws IOException
    Specified by:
      `getRandomVectorScorer` in class `FlatVectorsReader`
    Throws:
      `IOException`

  - ### checkIntegrity

    public void checkIntegrity() throws IOException
    Specified by:
      `checkIntegrity` in class `KnnVectorsReader`
    Throws:
      `IOException`

  - ### getFloatVectorValues

    public Lucene102BinaryQuantizedVectorsReader.BinarizedVectorValues getFloatVectorValues(String field) throws IOException
    Specified by:
      `getFloatVectorValues` in class `KnnVectorsReader`
    Throws:
      `IOException`

  - ### getByteVectorValues

    public ByteVectorValues getByteVectorValues(String field) throws IOException
    Specified by:
      `getByteVectorValues` in class `KnnVectorsReader`
    Throws:
      `IOException`

  - ### search

    public void search(String field, byte[] target, KnnCollector knnCollector, AcceptDocs acceptDocs) throws IOException
    Overrides:
      `search` in class `FlatVectorsReader`
    Throws:
      `IOException`

  - ### search

    public void search(String field, float[] target, KnnCollector knnCollector, AcceptDocs acceptDocs) throws IOException
    Overrides:
      `search` in class `FlatVectorsReader`
    Throws:
      `IOException`

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Throws:
      `IOException`

  - ### ramBytesUsed

    public long ramBytesUsed()
    Specified by:
      `ramBytesUsed` in interface `Accountable`

  - ### getOffHeapByteSize

    public Map<String,Long> getOffHeapByteSize(FieldInfo fieldInfo)
    Overrides:
      `getOffHeapByteSize` in class `KnnVectorsReader`

  - ### getQuantizedVectorValues

    public BaseQuantizedByteVectorValues getQuantizedVectorValues(String fieldName)
    Specified by:
      `getQuantizedVectorValues` in interface `QuantizedVectorsReader`

  - ### getQuantizationState

    public ScalarQuantizer getQuantizationState(String fieldName)
    Specified by:
      `getQuantizationState` in interface `QuantizedVectorsReader`

  - ### getRandomVectorScorerSupplierForMerge

    public CloseableRandomVectorScorerSupplier getRandomVectorScorerSupplierForMerge(FieldInfo fieldInfo, SegmentWriteState segmentWriteState) throws IOException
    Specified by:
      `getRandomVectorScorerSupplierForMerge` in interface `QuantizedVectorsReader`
    Throws:
      `IOException`