# Elasticsearch script groovy - Document Fields

**URL:** <https://discuss.elastic.co/t/elasticsearch-script-groovy-document-fields/59672>\
**Category:** Elasticsearch\
**Created:** [September 2, 2016, 2:01pm UTC](https://discuss.elastic.co/t/elasticsearch-script-groovy-document-fields/59672 "2016-09-02T14:01:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yovo\_yovchev](https://avatars.discourse-cdn.com/v4/letter/y/73ab20/32.png) [@yovo\_yovchev](https://discuss.elastic.co/u/yovo_yovchev)\
**Post date:** [September 2, 2016, 2:01pm UTC](https://discuss.elastic.co/t/elasticsearch-script-groovy-document-fields/59672/1 "2016-09-02T14:01:52Z")

</div>

I am trying to execute one inline script from my application but whatever I do I am receiving the same error

"failed to run inline script [doc['my\_field'].value-1400000000] using lang [groovy]","caused\_by":{"type":"illegal\_argument\_exception","reason":"No field found for [my\_field] in mapping with types [t]"

I have set "script.engine.groovy.inline.search: true " in the yml. I checked if the field is not missing for real and tried with any other field. If I try to execute script that is not calling any field the script is working. Am I missing something? What could be the root problem for this?

Thanks

---

<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, 10:22pm UTC](https://discuss.elastic.co/t/elasticsearch-script-groovy-document-fields/59672/3 "2017-07-05T22:22:36Z")

</div>


