Skip to content

Avoid nested docs in painless execute api #127991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Painless Execution API does not work with documents which has nested types
3 participants