# Default script language

**URL:** <https://discuss.elastic.co/t/default-script-language/18894>\
**Category:** Elasticsearch\
**Created:** [July 25, 2014, 8:05am UTC](https://discuss.elastic.co/t/default-script-language/18894 "2014-07-25T08:05:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jettro\_Coenradie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jettro_coenradie/32/59704_2.png) [@Jettro\_Coenradie](https://discuss.elastic.co/u/Jettro_Coenradie)\
**Post date:** [July 25, 2014, 8:05am UTC](https://discuss.elastic.co/t/default-script-language/18894/1 "2014-07-25T08:05:40Z")

</div>

Hi,  
I was playing around with the new scripting support in 1.3. In the  
documentation is stated that groovy is now the default language. This is  
not true for all situations. The following query for instance is returning  
a message about the use of mvel. I have to explicitly set the lang to  
groovy. In the query. Am I missing something?

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html)

GET mymusic/\_search  
{  
"query": {  
"function\_score": {  
"query": {  
"range": {  
"year": {  
"gte": 2000  
}  
}  
},  
"functions": [  
{  
"script\_score": {  
"script": "\_score \* doc['year'].value"  
}  
}  
]  
}  
}  
}

The response for this query is:  
ScriptException[dynamic scripting for [mvel] disabled]

thanks, Jettro

--  
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/b518a387-a02c-40ac-af7f-01ff41f50bc3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b518a387-a02c-40ac-af7f-01ff41f50bc3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 25, 2014, 8:27am UTC](https://discuss.elastic.co/t/default-script-language/18894/2 "2014-07-25T08:27:41Z")

</div>

Thanks. Tested. Issue opened here: [https://github.com/elasticsearch/elasticsearch/issues/7029](https://github.com/elasticsearch/elasticsearch/issues/7029)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 25 juillet 2014 à 10:05:43, Jettro Coenradie ([jettro.coenradie@gmail.com](mailto:jettro.coenradie@gmail.com)) a écrit:

Hi,  
I was playing around with the new scripting support in 1.3. In the documentation is stated that groovy is now the default language. This is not true for all situations. The following query for instance is returning a message about the use of mvel. I have to explicitly set the lang to groovy. In the query. Am I missing something?

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html)

GET mymusic/\_search  
{  
"query": {  
"function\_score": {  
"query": {  
"range": {  
"year": {  
"gte": 2000  
}  
}  
},  
"functions": [  
{  
"script\_score": {  
"script": "\_score \* doc['year'].value"  
}  
}  
]  
}  
}  
}

The response for this query is:  
ScriptException[dynamic scripting for [mvel] disabled]

## thanks, Jettro

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/b518a387-a02c-40ac-af7f-01ff41f50bc3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b518a387-a02c-40ac-af7f-01ff41f50bc3%40googlegroups.com).  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53d214fd.2cd89a32.13e40%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53d214fd.2cd89a32.13e40%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 25, 2014, 8:29am UTC](https://discuss.elastic.co/t/default-script-language/18894/3 "2014-07-25T08:29:48Z")

</div>

Actually mvel is still the default for 1.3.0.  
groovy will be the default in 1.4.0.

We will fix the doc.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 25 juillet 2014 à 10:27:44, David Pilato (david@pilato.fr) a écrit:

Thanks. Tested. Issue opened here: [https://github.com/elasticsearch/elasticsearch/issues/7029](https://github.com/elasticsearch/elasticsearch/issues/7029)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 25 juillet 2014 à 10:05:43, Jettro Coenradie ([jettro.coenradie@gmail.com](mailto:jettro.coenradie@gmail.com)) a écrit:

Hi,  
I was playing around with the new scripting support in 1.3. In the documentation is stated that groovy is now the default language. This is not true for all situations. The following query for instance is returning a message about the use of mvel. I have to explicitly set the lang to groovy. In the query. Am I missing something?

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html)

GET mymusic/\_search  
{  
"query": {  
"function\_score": {  
"query": {  
"range": {  
"year": {  
"gte": 2000  
}  
}  
},  
"functions": [  
{  
"script\_score": {  
"script": "\_score \* doc['year'].value"  
}  
}  
]  
}  
}  
}

The response for this query is:  
ScriptException[dynamic scripting for [mvel] disabled]

## thanks, Jettro

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/b518a387-a02c-40ac-af7f-01ff41f50bc3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b518a387-a02c-40ac-af7f-01ff41f50bc3%40googlegroups.com).  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53d2157c.4b588f54.13e40%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53d2157c.4b588f54.13e40%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:13am UTC](https://discuss.elastic.co/t/default-script-language/18894/4 "2017-07-06T01:13:10Z")

</div>


