Manticoresearch.Knn

February 12, 2026 ยท View on GitHub

Properties

NameTypeDescriptionNotes
fieldStringField to perform the k-nearest neighbor search on
kNumberThe number of nearest neighbors to return
queryKnnQuery[optional]
queryVector[Number]The vector used as input for the KNN search[optional]
docIdNumberThe docuemnt ID used as input for the KNN search[optional]
efNumberOptional parameter controlling the accuracy of the search[optional]
rescoreBooleanOptional parameter enabling KNN rescoring (disabled by default)[optional]
oversamplingNumberOptional parameter setting a factor by which k is multiplied when executing the KNN search[optional]
filterQueryFilter[optional]