Skip to content

Conversation

@tteofili
Copy link
Contributor

@tteofili tteofili commented Mar 25, 2025

docs need to mention that nested knn queries only support score_mode=max.
see #122625

@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Mar 25, 2025
@tteofili tteofili added >docs General docs changes :Search Relevance/Search Catch all for Search Relevance labels Mar 25, 2025
@tteofili tteofili added the priority:normal A label for assessing bug priority to be used by ES engineers label Mar 25, 2025
@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch and removed needs:triage Requires assignment of a team area label labels Mar 25, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)


`score_mode`
: (Optional, string) Indicates how scores for matching child objects affect the root parent document’s [relevance score](/reference/query-languages/query-dsl/query-filter-context.md#relevance-scores). Valid values are:
: (Optional, string) Indicates how scores for matching child objects affect the root parent document’s [relevance score](/reference/query-languages/query-dsl/query-filter-context.md#relevance-scores). Default is `avg`, but nested `knn` queries only support `score_mode=max`. Valid values are:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind also putting a reference on query-dsl-knn-query.md There is a section there on Knn query inside a nested query

Also, it seems like we need to also now update: https://github.com/elastic/docs-content/blob/main/solutions/search/vector/knn.md in a separate PR.

Copy link
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call out, added two more places where we should mention this if its not already mentioned.

@tteofili tteofili merged commit 7a610c3 into elastic:main Mar 26, 2025
6 checks passed
tteofili added a commit to elastic/docs-content that referenced this pull request Mar 26, 2025
documentation fix related to
[this](elastic/elasticsearch#122625), this
adds a note that nested KNN queries only support `score_mode=max`.
see also elastic/elasticsearch#125582.
omricohenn pushed a commit to omricohenn/elasticsearch that referenced this pull request Mar 28, 2025
* [docs] nested knn only supports score_mode max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>docs General docs changes priority:normal A label for assessing bug priority to be used by ES engineers :Search Relevance/Search Catch all for Search Relevance Team:Docs Meta label for docs team Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants