Module org.apache.lucene.core
Class Lucene99FlatVectorsWriter.FlatCloseableRandomVectorScorerSupplier
java.lang.Object
org.apache.lucene.codecs.lucene99.Lucene99FlatVectorsWriter.FlatCloseableRandomVectorScorerSupplier
- All Implemented Interfaces:
Closeable,AutoCloseable,CloseableRandomVectorScorerSupplier,RandomVectorScorerSupplier
- Enclosing class:
Lucene99FlatVectorsWriter
static final class Lucene99FlatVectorsWriter.FlatCloseableRandomVectorScorerSupplier
extends Object
implements CloseableRandomVectorScorerSupplier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Closeableprivate final RandomVectorScorerSupplier -
Constructor Summary
ConstructorsConstructorDescriptionFlatCloseableRandomVectorScorerSupplier(Closeable onClose, int numVectors, RandomVectorScorerSupplier supplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()copy()Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.scorer(int ord) This creates aRandomVectorScorerfor scoring random nodes in batches against the given ordinal.int
-
Field Details
-
supplier
-
onClose
-
numVectors
private final int numVectors
-
-
Constructor Details
-
FlatCloseableRandomVectorScorerSupplier
FlatCloseableRandomVectorScorerSupplier(Closeable onClose, int numVectors, RandomVectorScorerSupplier supplier)
-
-
Method Details
-
scorer
Description copied from interface:RandomVectorScorerSupplierThis creates aRandomVectorScorerfor scoring random nodes in batches against the given ordinal.- Specified by:
scorerin interfaceRandomVectorScorerSupplier- Parameters:
ord- the ordinal of the node to compare- Returns:
- a new
RandomVectorScorer - Throws:
IOException
-
copy
Description copied from interface:RandomVectorScorerSupplierMake a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.- Specified by:
copyin interfaceRandomVectorScorerSupplier- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
totalVectorCount
public int totalVectorCount()- Specified by:
totalVectorCountin interfaceCloseableRandomVectorScorerSupplier
-