elasticsearch/docs/reference/rest-api
Mayya Sharipova 405e39660b
Support k parameter for knn query (#110233)
Introduce an optional k param for knn query

If k is not set, knn query has the previous behaviour:
- `num_candidates` docs  is collected from each shard. This `num_candidates` docs
are used for combining with results with other queries and aggregations on each shard.
- docs from all shards are merged to produce the top global `size` results

If k is set, the behaviour instead is following:
- `k` docs is collected from each shard. This `k` docs are used for
combining results with other queries and aggregations on each shard.
- similarly, docs from all shards are merged to produce the top global `size`
results.

Having `k` param makes it more intuitive for users to address their needs.
They also don't need to care and can skip `num_candidates` param for this query
as it is of more internal details to tune how knn search operates.

Closes #108473
2024-06-28 09:59:28 -04:00
..
logstash [DOCS] Move x-pack docs to docs/reference dir (#99209) 2023-09-12 14:53:41 -04:00
security Refactor field name translator of query endpoints for security entities (#109559) 2024-06-13 14:12:19 +03:00
watcher [DOCS] Align docs to implementation for timeout parameters (#108593) 2024-05-16 13:05:39 +10:00
common-options.asciidoc Typo in example of the filter_path option (#84551) (#84661) 2022-03-04 09:10:55 -05:00
common-parms.asciidoc Support k parameter for knn query (#110233) 2024-06-28 09:59:28 -04:00
cron-expressions.asciidoc [DOCS] Add info about GET/POST to the API conventions. (#74529) 2021-06-30 09:24:42 -07:00
defs.asciidoc [DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413) 2024-04-17 14:37:07 +02:00
index.asciidoc [DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413) 2024-04-17 14:37:07 +02:00
info.asciidoc Enable Universal Profiling as Enterprise feature (#100333) 2023-10-09 07:58:04 +02:00
rest-api-compatibility.asciidoc [DOCS] Link to the 7.17 upgrade assistant docs (#83613) (#83615) 2022-02-07 18:29:26 -05:00
root.asciidoc (DOC+) Version API page for ES API Base URL (#105845) 2024-03-18 13:02:54 -06:00
security.asciidoc [DOCS] Remove remaining beta flags for RCS (#108201) 2024-05-03 09:12:37 +02:00
usage.asciidoc Expose basic x-pack telemetry for failure store (#108899) 2024-05-23 16:45:11 +03:00
watcher.asciidoc [DOCS] Move x-pack docs to docs/reference dir (#99209) 2023-09-12 14:53:41 -04:00