Module org.apache.lucene.core
Package org.apache.lucene.codecs.hnsw
Class DefaultFlatVectorScorer.FloatVectorScorer
java.lang.Object
org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer
org.apache.lucene.codecs.hnsw.DefaultFlatVectorScorer.FloatVectorScorer
- All Implemented Interfaces:
RandomVectorScorer
- Enclosing class:
DefaultFlatVectorScorer
private static class DefaultFlatVectorScorer.FloatVectorScorer
extends RandomVectorScorer.AbstractRandomVectorScorer
A
RandomVectorScorer
for float vectors.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float[]
private final VectorSimilarityFunction
private final FloatVectorValues
-
Constructor Summary
ConstructorsConstructorDescriptionFloatVectorScorer
(FloatVectorValues values, float[] query, VectorSimilarityFunction similarityFunction) -
Method Summary
Modifier and TypeMethodDescriptionfloat
score
(int node) Returns the score between the query and the provided node.Methods inherited from class org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer
getAcceptOrds, maxOrd, ordToDoc
-
Field Details
-
values
-
query
private final float[] query -
similarityFunction
-
-
Constructor Details
-
FloatVectorScorer
public FloatVectorScorer(FloatVectorValues values, float[] query, VectorSimilarityFunction similarityFunction)
-
-
Method Details
-
score
Description copied from interface:RandomVectorScorer
Returns the score between the query and the provided node.- Parameters:
node
- a random node in the graph- Returns:
- the computed score
- Throws:
IOException
-