Interface FlatVectorsWriter.MergeScorerData

All Superinterfaces:
AutoCloseable, Closeable
Enclosing class:
FlatVectorsWriter

public static interface FlatVectorsWriter.MergeScorerData extends Closeable
Data prepared while merging a field for scoring its merged vectors. The caller must close it whether or not it obtains a supplier; closing releases only what scorerSupplier(org.apache.lucene.codecs.hnsw.FlatVectorsReader) did not hand over. A single merge thread uses each instance, so implementations need not be thread-safe.
  • Method Details

    • scorerSupplier

      Creates a scorer supplier for mergedReader. The caller must close the supplier to release the prepared data.

      The reader is matched to the preparing writer's own reader by type; any other reader is rejected.

      This method may be called at most once, after the preparing writer is finished and closed and mergedReader is open on the segment it wrote. A second call, or a call after Closeable.close(), throws IllegalStateException.

      Parameters:
      mergedReader - a reader over the segment the writer wrote
      Returns:
      a scorer supplier over the merged vectors, or null if this data cannot serve that reader
      Throws:
      IOException - if an I/O error occurs