-
Notifications
You must be signed in to change notification settings - Fork 25k
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
illegal_argument_exception when using scripted fields. #20885
Comments
@stacey-gammon In painless, params need to be referenced as |
Thanks for the update @clintongormley. To confirm, this is not the case with groovy as the selected language? That one appears to break when I use params.value, but not if I just use value.
|
That is correct. Groovy dumps all the params into local variables. Painless has them in the params var. |
I think this is a thing we'll be able to improve on with #20621 but that isn't ready. This level of clarity is about the best we'll get with painless for the next while. Painless is marked experimental because we're really trying to make improve on it constantly. It is the default because groovy security is a nightmare and we want off of groovy as fast as we can.... |
Yes and no. Params from the user (passed in through the runtime api) will stay in params. But things that each context provides (eg _source for scripted fields) will be accessible as a local variable again once we have contexts done. |
There is a bug in the Kibana Repo that looks like it might be exposing an ES bug. Could someone take a look? elastic/kibana#8404
Here is the relevant request/response that is triggering the error, copied from the above issue:
Response:
The text was updated successfully, but these errors were encountered: