Package org.apache.lucene.codecs.hnsw
Interface FlatVectorsWriter.MergeScorerData
- All Superinterfaces:
AutoCloseable,Closeable
- Enclosing class:
FlatVectorsWriter
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 Summary
Modifier and TypeMethodDescriptionscorerSupplier(FlatVectorsReader mergedReader) Creates a scorer supplier formergedReader.
-
Method Details
-
scorerSupplier
CloseableRandomVectorScorerSupplier scorerSupplier(FlatVectorsReader mergedReader) throws IOException Creates a scorer supplier formergedReader. 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
mergedReaderis open on the segment it wrote. A second call, or a call afterCloseable.close(), throwsIllegalStateException.- Parameters:
mergedReader- a reader over the segment the writer wrote- Returns:
- a scorer supplier over the merged vectors, or
nullif this data cannot serve that reader - Throws:
IOException- if an I/O error occurs
-