Module org.apache.lucene.core
Package org.apache.lucene.search
Class FloatVectorSimilarityValuesSource
java.lang.Object
org.apache.lucene.search.DoubleValuesSource
org.apache.lucene.search.VectorSimilarityValuesSource
org.apache.lucene.search.FloatVectorSimilarityValuesSource
- All Implemented Interfaces:
SegmentCacheable
A
DoubleValuesSource
which computes the vector similarity scores between the query vector
and the KnnFloatVectorField
for documents.-
Field Summary
FieldsFields inherited from class org.apache.lucene.search.VectorSimilarityValuesSource
fieldName
Fields inherited from class org.apache.lucene.search.DoubleValuesSource
SCORES
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.lucene.search.VectorSimilarityValuesSource
getValues, isCacheable, needsScores, rewrite
Methods inherited from class org.apache.lucene.search.DoubleValuesSource
constant, explain, fromDoubleField, fromField, fromFloatField, fromIntField, fromLongField, fromQuery, fromScorer, getSortField, similarityToQueryVector, similarityToQueryVector, toLongValuesSource
-
Field Details
-
queryVector
private final float[] queryVector
-
-
Constructor Details
-
FloatVectorSimilarityValuesSource
-
-
Method Details
-
getScorer
- Specified by:
getScorer
in classVectorSimilarityValuesSource
- Throws:
IOException
-
hashCode
public int hashCode()- Specified by:
hashCode
in classDoubleValuesSource
-
equals
- Specified by:
equals
in classDoubleValuesSource
-
toString
- Specified by:
toString
in classDoubleValuesSource
-