Module org.apache.lucene.core
Package org.apache.lucene.codecs.hnsw
Class DefaultFlatVectorScorer.ByteScoringSupplier
java.lang.Object
org.apache.lucene.codecs.hnsw.DefaultFlatVectorScorer.ByteScoringSupplier
- All Implemented Interfaces:
RandomVectorScorerSupplier
- Enclosing class:
DefaultFlatVectorScorer
private static final class DefaultFlatVectorScorer.ByteScoringSupplier
extends Object
implements RandomVectorScorerSupplier
RandomVectorScorerSupplier for bytes vector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final VectorSimilarityFunction
private final RandomAccessVectorValues.Bytes
private final RandomAccessVectorValues.Bytes
private final RandomAccessVectorValues.Bytes
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ByteScoringSupplier
(RandomAccessVectorValues.Bytes vectors, VectorSimilarityFunction similarityFunction) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
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.
-
Field Details
-
vectors
-
vectors1
-
vectors2
-
similarityFunction
-
-
Constructor Details
-
ByteScoringSupplier
private ByteScoringSupplier(RandomAccessVectorValues.Bytes vectors, VectorSimilarityFunction similarityFunction) throws IOException - Throws:
IOException
-
-
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
-
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
-