Groovy Scripting Language Deprecated in 5.0, can we use painless as alternatives?
what are the major key points between groovy and painless?
org.elasticsearch.script.Script.Script(ScriptType type, String lang, String idOrCode, Map<String, Object> params)
idOrCode : groovery(replaced) with painless
Example:
new Script(ScriptType.INLINE,"ctx._source.events_count += events_count;","painless", MAP);
more details are welcome