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)
VectorScorer
getScorer(LeafReaderContext ctx)
int
hashCode()
java.lang.String
toString()
-
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
-
-
-
-
Method Detail
-
getScorer
public VectorScorer getScorer(LeafReaderContext ctx) throws java.io.IOException
- Specified by:
getScorer
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
-
-