knn.md 742 B

% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.

Parameters

field : Field that the query will target.

query : Vector value to find top nearest neighbours for.

k : The number of nearest neighbors to return from each shard. Elasticsearch collects k results from each shard, then merges them to find the global top results. This value must be less than or equal to num_candidates.

options : (Optional) kNN additional options as function named parameters. See knn query for more information.