Module org.apache.lucene.core
Package org.apache.lucene.search
Class ByteVectorSimilarityValuesSource
- java.lang.Object
-
- org.apache.lucene.search.DoubleValuesSource
-
- org.apache.lucene.search.VectorSimilarityValuesSource
-
- org.apache.lucene.search.ByteVectorSimilarityValuesSource
-
- All Implemented Interfaces:
SegmentCacheable
class ByteVectorSimilarityValuesSource extends VectorSimilarityValuesSource
ADoubleValuesSource
which computes the vector similarity scores between the query vector and theKnnByteVectorField
for documents.
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
queryVector
-
Fields inherited from class org.apache.lucene.search.VectorSimilarityValuesSource
fieldName
-
Fields inherited from class org.apache.lucene.search.DoubleValuesSource
SCORES
-
-
Constructor Summary
Constructors Constructor Description ByteVectorSimilarityValuesSource(byte[] vector, java.lang.String fieldName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
DoubleValues
getValues(LeafReaderContext ctx, DoubleValues scores)
Returns aDoubleValues
instance for the passed-in LeafReaderContext and scoresint
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.apache.lucene.search.VectorSimilarityValuesSource
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
-
-
-
-
Method Detail
-
getValues
public DoubleValues getValues(LeafReaderContext ctx, DoubleValues scores) throws java.io.IOException
Description copied from class:DoubleValuesSource
Returns aDoubleValues
instance for the passed-in LeafReaderContext and scoresIf scores are not needed to calculate the values (ie
returns false
, callers may safely passnull
for thescores
parameter.- Specified by:
getValues
in classVectorSimilarityValuesSource
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classDoubleValuesSource
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in classDoubleValuesSource
-
toString
public java.lang.String toString()
- Specified by:
toString
in classDoubleValuesSource
-
-