KnnFloatVectorQuery
constructor(field: String, target: FloatArray, k: Int, filter: Query?, searchStrategy: KnnSearchStrategy)
Find the k nearest documents to the target vector according to the vectors in the given field. target vector.
Parameters
field
a field that has been indexed as a KnnFloatVectorField.
target
the target of the search
k
the number of documents to find
Throws
if k is less than 1