Module org.apache.lucene.core
Class Lucene99ScalarQuantizedVectorsWriter.ScalarQuantizedCloseableRandomVectorScorerSupplier
java.lang.Object
org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorsWriter.ScalarQuantizedCloseableRandomVectorScorerSupplier
- All Implemented Interfaces:
Closeable
,AutoCloseable
,CloseableRandomVectorScorerSupplier
,RandomVectorScorerSupplier
- Enclosing class:
- Lucene99ScalarQuantizedVectorsWriter
static final class Lucene99ScalarQuantizedVectorsWriter.ScalarQuantizedCloseableRandomVectorScorerSupplier
extends Object
implements CloseableRandomVectorScorerSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorerSupplier
RandomVectorScorerSupplier.ByteScoringSupplier, RandomVectorScorerSupplier.FloatScoringSupplier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final Closeable
private final ScalarQuantizedRandomVectorScorerSupplier
-
Constructor Summary
ConstructorsConstructorDescriptionScalarQuantizedCloseableRandomVectorScorerSupplier
(Closeable onClose, int numVectors, ScalarQuantizedRandomVectorScorerSupplier supplier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
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 aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.int
-
Field Details
-
supplier
-
onClose
-
numVectors
private final int numVectors
-
-
Constructor Details
-
ScalarQuantizedCloseableRandomVectorScorerSupplier
ScalarQuantizedCloseableRandomVectorScorerSupplier(Closeable onClose, int numVectors, ScalarQuantizedRandomVectorScorerSupplier supplier)
-
-
Method Details
-
scorer
Description copied from interface:RandomVectorScorerSupplier
This creates aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.- Specified by:
scorer
in interfaceRandomVectorScorerSupplier
- Parameters:
ord
- the ordinal of the node to compare- Returns:
- a new
RandomVectorScorer
- Throws:
IOException
-
copy
Description copied from interface:RandomVectorScorerSupplier
Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.- Specified by:
copy
in interfaceRandomVectorScorerSupplier
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
totalVectorCount
public int totalVectorCount()- Specified by:
totalVectorCount
in interfaceCloseableRandomVectorScorerSupplier
-