<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.6</version>
</dependency>
Configuration:
.put("script.inline", true)
.put("script.indexed", true)
.put("script.update", true)
.put("script.search", true)
.put("script.engine.groovy.indexed.aggs", true)
.put("script.engine.groovy.indexed.search", true)
.put("script.engine.groovy.indexed.update", true)
.put("script.engine.groovy.indexed.plugin", true);
Exception:
java.lang.IllegalArgumentException: script_lang not supported [groovy]
at org.elasticsearch.script.ScriptService.validateScriptLanguage(ScriptService.java:337)
at org.elasticsearch.script.ScriptService.putScriptToIndex(ScriptService.java:392)
I set a breakpoint in ScriptService and I can see it has the correct configuration but the only supported language it has is "native"
Here is code triggering it:
client.preparePutIndexedScript()
.setScriptLang("groovy")
.setId("asset_append_export")
.setSource(script1)
.get();