Skip to content

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented May 9, 2025

Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs.

fixes #41004

Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes elastic#41004
@rjernst rjernst requested a review from martijnvg May 9, 2025 18:17
@rjernst rjernst requested a review from a team as a code owner May 9, 2025 18:17
@rjernst rjernst added >bug :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache auto-backport Automatically create backport pull requests when merged v8.19.0 v9.1.0 v8.17.7 v8.18.2 v9.0.2 labels May 9, 2025
@rjernst rjernst changed the title Avoid nested docs in painless execute Avoid nested docs in painless execute api May 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label May 9, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @rjernst, I've created a changelog YAML for you.

@smalyshev
Copy link
Contributor

I've checked this on my local install and I indeed no longer am getting errors with nested docs.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Ryan!

@rjernst rjernst merged commit d6ffe01 into elastic:main May 19, 2025
17 checks passed
@rjernst rjernst deleted the painless/execute_with_nested branch May 19, 2025 15:18
rjernst added a commit to rjernst/elasticsearch that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes elastic#41004
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19
8.17
8.18
9.0
rjernst added a commit to rjernst/elasticsearch that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes elastic#41004
rjernst added a commit to rjernst/elasticsearch that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes elastic#41004
rjernst added a commit to rjernst/elasticsearch that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes elastic#41004
elasticsearchmachine pushed a commit that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes #41004
elasticsearchmachine pushed a commit that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes #41004
elasticsearchmachine pushed a commit that referenced this pull request May 19, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes #41004
elasticsearchmachine pushed a commit that referenced this pull request May 20, 2025
Painless does not support accessing nested docs (except through _source). Yet the painless execute api indexes any nested docs that are found when parsing the sample document. This commit changes the ram indexing to only index the root document, ignoring any nested docs. fixes #41004 Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache Team:Core/Infra Meta label for core/infra team v8.17.7 v8.18.2 v8.19.0 v9.0.2 v9.1.0

4 participants