You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is worth noting that if I add the following class permission to the grants of the /modules/lang-groovy/plugin-security.policy file and restart my cluster, the script executes fine.
I've figured out that the as int type coercion is what's causing the error.
If I change the script to use the explicit new Integer(...) constructor instead of using type coercions, then it works flawlessly.
"inline": "def rparts = ctx._source.myDate.split('T'); def rtime = rparts[1].split(':'); ctx._source.myMinute = (new Integer(rtime[0]) * 60) + new Integer(rtime[1])"
I still think the class permission should be added to the policy file of the lang-groovy module, since type coercion is a perfectly valid groovy construct.
On my ES cluster running the latest 2.3.3 release (with groovy scripting enabled), I get the following error...
...when I execute the following update-by-query
It is worth noting that if I add the following class permission to the grants of the
/modules/lang-groovy/plugin-security.policy
file and restart my cluster, the script executes fine.permission org.elasticsearch.script.ClassPermission "org.codehaus.groovy.runtime.wrappers.Wrapper";
It is very similar to what's been reported here and to some extent this issue.
The text was updated successfully, but these errors were encountered: