Module org.apache.lucene.core
Package org.apache.lucene.util.hnsw
Class RandomVectorScorerSupplier.FloatScoringSupplier
- java.lang.Object
-
- org.apache.lucene.util.hnsw.RandomVectorScorerSupplier.FloatScoringSupplier
-
- All Implemented Interfaces:
RandomVectorScorerSupplier
- Enclosing interface:
- RandomVectorScorerSupplier
public static final class RandomVectorScorerSupplier.FloatScoringSupplier extends java.lang.Object implements RandomVectorScorerSupplier
RandomVectorScorerSupplier for Float vector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorerSupplier
RandomVectorScorerSupplier.ByteScoringSupplier, RandomVectorScorerSupplier.FloatScoringSupplier
-
-
Field Summary
Fields Modifier and Type Field Description private VectorSimilarityFunction
similarityFunction
private RandomAccessVectorValues<float[]>
vectors
private RandomAccessVectorValues<float[]>
vectors1
private RandomAccessVectorValues<float[]>
vectors2
-
Constructor Summary
Constructors Modifier Constructor Description private
FloatScoringSupplier(RandomAccessVectorValues<float[]> vectors, VectorSimilarityFunction similarityFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RandomVectorScorerSupplier
copy()
Make a copy of the supplier, which will copy the underlying vectorValues so the copy is safe to be used in other threads.RandomVectorScorer
scorer(int ord)
This creates aRandomVectorScorer
for scoring random nodes in batches against the given ordinal.
-
-
-
Field Detail
-
vectors
private final RandomAccessVectorValues<float[]> vectors
-
vectors1
private final RandomAccessVectorValues<float[]> vectors1
-
vectors2
private final RandomAccessVectorValues<float[]> vectors2
-
similarityFunction
private final VectorSimilarityFunction similarityFunction
-
-
Constructor Detail
-
FloatScoringSupplier
private FloatScoringSupplier(RandomAccessVectorValues<float[]> vectors, VectorSimilarityFunction similarityFunction) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
scorer
public RandomVectorScorer scorer(int ord) throws java.io.IOException
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:
java.io.IOException
-
copy
public RandomVectorScorerSupplier copy() throws java.io.IOException
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:
java.io.IOException
-
-