Module org.apache.lucene.core
Package org.apache.lucene.codecs.hnsw
Class DefaultFlatVectorScorer.ByteVectorScorer
- java.lang.Object
-
- org.apache.lucene.util.hnsw.RandomVectorScorer.AbstractRandomVectorScorer
-
- org.apache.lucene.codecs.hnsw.DefaultFlatVectorScorer.ByteVectorScorer
-
- All Implemented Interfaces:
RandomVectorScorer
- Enclosing class:
- DefaultFlatVectorScorer
private static class DefaultFlatVectorScorer.ByteVectorScorer extends RandomVectorScorer.AbstractRandomVectorScorer
ARandomVectorScorer
for byte vectors.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.lucene.util.hnsw.RandomVectorScorer
RandomVectorScorer.AbstractRandomVectorScorer
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
query
private VectorSimilarityFunction
similarityFunction
private RandomAccessVectorValues.Bytes
values
-
Constructor Summary
Constructors Constructor Description ByteVectorScorer(RandomAccessVectorValues.Bytes values, byte[] query, VectorSimilarityFunction similarityFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
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 Detail
-
values
private final RandomAccessVectorValues.Bytes values
-
query
private final byte[] query
-
similarityFunction
private final VectorSimilarityFunction similarityFunction
-
-
Constructor Detail
-
ByteVectorScorer
public ByteVectorScorer(RandomAccessVectorValues.Bytes values, byte[] query, VectorSimilarityFunction similarityFunction)
-
-
Method Detail
-
score
public float score(int node) throws java.io.IOException
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:
java.io.IOException
-
-