# Dynamic scripting doesn't work even though I have enabled it

**URL:** <https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188>\
**Category:** Elasticsearch\
**Created:** [December 15, 2015, 1:50am UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188 "2015-12-15T01:50:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cuongvt101](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@cuongvt101](https://discuss.elastic.co/u/cuongvt101)\
**Post date:** [December 15, 2015, 1:50am UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188/1 "2015-12-15T01:50:35Z")

</div>

On my local computer, I enable dynamic scripting by adding either of these to config/elasticsearch.yml:  
`script.disable_dynamic: false`  
or  
`script.inline: on`  
`script.indexed: on`

and it works. However, on a development server that a colleague gave me, I did the same thing and dynamic scripting still doesn't work (Error is: QueryParsingException[[visualsearch\_cuong] script\_score the script could not be loaded]; nested: ScriptException[dynamic scripting for [groovy] disabled]; ). There're quite many indexes on that server (including my index) and the Elasticsearch version is 1.7.2.

I'm pretty new to Elasticsearch. What could be wrong? Thanks

---

<div class="post-metadata">

**Author:** ![cuongvt101](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@cuongvt101](https://discuss.elastic.co/u/cuongvt101)\
**Post date:** [December 15, 2015, 8:47pm UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188/2 "2015-12-15T20:47:28Z")

</div>

I know my question is not very clear because "A lot of things could be wrong", but I honestly don't know what to search. If you need any further information from my server I'll provide. I just want to find out what potentially can cause the problem. Thanks

---

<div class="post-metadata">

**Author:** ![111106](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111106/32/6665_2.png) [@111106](https://discuss.elastic.co/u/111106)\
**Post date:** [December 16, 2015, 2:01pm UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188/3 "2015-12-16T14:01:17Z")

</div>

I don't know if you've already resolved the issue, but you need to refer to the manual here:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#enable-dynamic-scripting](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#enable-dynamic-scripting)

Basically, you need to enable groovy language for your specific need. Mine was to add:  
script.engine.groovy.inline.search: off

---

<div class="post-metadata">

**Author:** ![cuongvt101](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@cuongvt101](https://discuss.elastic.co/u/cuongvt101)\
**Post date:** [December 16, 2015, 6:04pm UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188/4 "2015-12-16T18:04:38Z")

</div>

I thought Groovy is used by default as scripting language for Elastic? I tried what you suggested but it didn't help. May be need to put to `on`?

---

<div class="post-metadata">

**Author:** ![111106](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111106/32/6665_2.png) [@111106](https://discuss.elastic.co/u/111106)\
**Post date:** [December 16, 2015, 6:19pm UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188/5 "2015-12-16T18:19:14Z")

</div>

Oh, yeah, sorry. Definitely on. I'm losing my mind slowly, trying to solve my own ES issues. 🙂

Does it help with on?

---

<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 5, 2017, 11:30pm UTC](https://discuss.elastic.co/t/dynamic-scripting-doesnt-work-even-though-i-have-enabled-it/37188/6 "2017-07-05T23:30:28Z")

</div>


