-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Cannot Use _source With Execute Painless Script API #13687
Comments
Hi @git-blame Thanks for bringing this up. Actually the issue is with documentation. The field is Here is the reproduce: I have copy as curl the commands as per documentation: Create index:
Run a script to determine if a student is eligible to graduate with honors: [now the copy as curl gives a parsing error because of
Adding up escape character
Additionally, I think the documentation change is required to be fixed to Basically, everything in the below statement is misleading:
Let me try and fix up the documentation here. I think this issue fits better in documentation repo. |
Thanks @sandeshkr419 but my original problem is that the "old" documentation states that:
But I cannot create, in the Outside of this REST API, I can write painless scripts that access |
Describe the bug
According to documentation, with the filter context and supplying an in-memory doc:
If I supply a "_source" attribute, OpenSearch complains about unknown field.
If I include it in the document, I get metadata error:
It is not clear how an in-memory document as part of the Request can include a
_source
per the document. I am testing a script that is accessing_source
.Related component
Other
To Reproduce
Issue a REST call to
/_scripts/painless/_execute
with a document containing a_source
attribute.Expected behavior
Script can access the
_source
attribute per the documentation.Additional Details
No response
The text was updated successfully, but these errors were encountered: