Script_lang not supported [groovy]

While partial update with java api I get this error: Caused by:
org.elasticsearch.ElasticsearchIllegalArgumentException: script_lang not
supported [groovy]

My es version 1.5.1

My code

client.prepareUpdate(index, type, documentID)

        .setScript("ctx._source.current=current; "
        + "ctx._source.updatedate=updatedate", ScriptService.ScriptType.

INLINE)
.setScriptParams(updateObject).execute().actionGet();

updateObject variable is defined as follows.

private Map<String, Object> updateObject = new HashMap<String, Object>();

Help me please, what is problem?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b3c83cad-ee94-46f9-8296-c87da825b1a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I forgot to express. My project have got groovy dependency.

org.codehaus.groovy groovy-all 2.3.5 jar

On Saturday, April 25, 2015 at 2:18:52 PM UTC+3, Terra Sacer wrote:

While partial update with java api I get this error: Caused by:
org.elasticsearch.ElasticsearchIllegalArgumentException: script_lang not
supported [groovy]

My es version 1.5.1

My code

client.prepareUpdate(index, type, documentID)

        .setScript("ctx._source.current=current; "
        + "ctx._source.updatedate=updatedate", ScriptService.

ScriptType.INLINE)
.setScriptParams(updateObject).execute().actionGet();

updateObject variable is defined as follows.

private Map<String, Object> updateObject = new HashMap<String, Object>();

Help me please, what is problem?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Not sure it’s your issue but elasticsearch 1.5 uses Groovy 2.4.0

    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.0</version>
    </dependency>

--
David Pilato - Developer | Evangelist

@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 25 avr. 2015 à 13:29, Terra Sacer terrasacer@gmail.com a écrit :

I forgot to express. My project have got groovy dependency.

org.codehaus.groovy groovy-all 2.3.5 jar

On Saturday, April 25, 2015 at 2:18:52 PM UTC+3, Terra Sacer wrote:
While partial update with java api I get this error: Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: script_lang not supported [groovy]

My es version 1.5.1

My code

client.prepareUpdate(index, type, documentID)

        .setScript("ctx._source.current=current; "
        + "ctx._source.updatedate=updatedate",ScriptService.ScriptType.INLINE)
        .setScriptParams(updateObject).execute().actionGet();

updateObject variable is defined as follows.

private Map<String, Object> updateObject = new HashMap<String,Object>();

Help me please, what is problem?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C543ACDF-D9D6-433F-912D-9D8A7276CD60%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Yes David, the issue is not related to it.

I changed my code, but annoying can't find the root problem.

client.prepareUpdate(index, type, documentID).setDoc(updateObject).get();

On Saturday, April 25, 2015 at 4:52:48 PM UTC+3, David Pilato wrote:

Not sure it’s your issue but elasticsearch 1.5 uses Groovy 2.4.0

    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.0</version>
    </dependency>

--
David Pilato - Developer | Evangelist
elastic.co http://elastic.co
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr
https://twitter.com/elasticsearchfr | @scrutmydocs
https://twitter.com/scrutmydocs

Le 25 avr. 2015 à 13:29, Terra Sacer <terra...@gmail.com <javascript:>> a
écrit :

I forgot to express. My project have got groovy dependency.

org.codehaus.groovy groovy-all 2.3.5 jar

On Saturday, April 25, 2015 at 2:18:52 PM UTC+3, Terra Sacer wrote:

While partial update with java api I get this error: Caused by:
org.elasticsearch.ElasticsearchIllegalArgumentException: script_lang not
supported [groovy]

My es version 1.5.1

My code

client.prepareUpdate(index, type, documentID)

        .setScript("ctx._source.current=current; "
        + "ctx._source.updatedate=updatedate",ScriptService.

ScriptType.INLINE)
.setScriptParams(updateObject).execute().actionGet();

updateObject variable is defined as follows.

private Map<String, Object> updateObject = new HashMap<String,Object>();

Help me please, what is problem?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/1ef63e25-e438-41f1-b2f9-8a9f73687901%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Were you able to find a solution to this? I'm facing the same issue with ES 2.2.0
I've tried using Groovy versions 2.3.2, 2.4.0 and 2.4.4

Thanks!

Yes, hello ES?? I'm having the same problem with ES 2.3.4. What do I need to do to get groovy scripts to execute? The ES documentation is silent about this.

Reviving and old thread usually isn't the way to go.

Usually if groovy scripts aren't running it is because the module didn't load - when Elasticsearch starts up it logs all the modules it loaded. You should check there.