Skip to content

added doc key in the update_by_query method , so that we can this met… #131167

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 2 commits into
base: main
Choose a base branch
from

Conversation

vishnupancharatnala
Copy link

…hod as update method. Here i created a wrapper around source.ctx for doc
This PR introduces a wrapper around ctx._source in update_by_query scripts to provide a doc field, aligning its structure with the standard update API.

In the current implementation, update_by_query only exposes source._ctx, whereas the update API allows scripts to access ctx._source.doc.

This change:

Adds a doc field to the CtxMap passed to the script.

Ensures a consistent scripting experience between update and update_by_query.

Adds corresponding test coverage to validate the new field.

…hod as update method. Here i created a wrapper around source.ctx for doc
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.2.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Jul 13, 2025
@vishnupancharatnala
Copy link
Author

Hi, this is a community contribution. Could someone from the Elastic team please assign this PR? Thank you!

@vishnupancharatnala
Copy link
Author

Also, could someone from Elastic add the required labels (e.g., :Team, >type) to pass CI? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team needs:triage Requires assignment of a team area label v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants