# Access doc fields value in script-expert-scoring

**URL:** <https://discuss.elastic.co/t/access-doc-fields-value-in-script-expert-scoring/171217>\
**Category:** Elasticsearch\
**Created:** [March 7, 2019, 2:11am UTC](https://discuss.elastic.co/t/access-doc-fields-value-in-script-expert-scoring/171217 "2019-03-07T02:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrikerMan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brikerman/32/36811_2.png) [@BrikerMan](https://discuss.elastic.co/u/BrikerMan)\
**Post date:** [March 7, 2019, 2:11am UTC](https://discuss.elastic.co/t/access-doc-fields-value-in-script-expert-scoring/171217/1 "2019-03-07T02:11:23Z")

</div>

I have a document have `body` = 'a b c a a'. And I am working on a custom plugin based on the [script-expert-scoring example](https://github.com/elastic/elasticsearch/tree/master/plugins/examples/script-expert-scoring). Is there any way to access to documents' body field in the `MyExpertScriptEngine` class

---

<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:** [April 4, 2019, 2:23am UTC](https://discuss.elastic.co/t/access-doc-fields-value-in-script-expert-scoring/171217/2 "2019-04-04T02:23:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
