# How to add additional data when using ScriptEngineService and return as part of result

**URL:** <https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096>\
**Category:** Elasticsearch\
**Created:** [March 6, 2019, 11:31am UTC](https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096 "2019-03-06T11:31:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yang\_zhen](https://avatars.discourse-cdn.com/v4/letter/y/7feea3/32.png) [@Yang\_zhen](https://discuss.elastic.co/u/Yang_zhen)\
**Post date:** [March 6, 2019, 11:31am UTC](https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096/1 "2019-03-06T11:31:42Z")

</div>

Hi  
I am using ScriptEnginService to implement a scoring plugin, except the score calculated by the runAsDouble() function, I want to add more additional feature data and return as a part of result. Some doc in my index is very large, so I want to calculate some features on ES and return these features for next stage to avoid transfer the large hole document.

@dadoonet , @rjernst@baz@javanna can you help?

Thanks a lot.

---

<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:** [March 6, 2019, 11:58am UTC](https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096/2 "2019-03-06T11:58:36Z")

</div>

Please don't ping people who not yet involved in your question.

---

<div class="post-metadata">

**Author:** ![Yang\_zhen](https://avatars.discourse-cdn.com/v4/letter/y/7feea3/32.png) [@Yang\_zhen](https://discuss.elastic.co/u/Yang_zhen)\
**Post date:** [March 6, 2019, 12:05pm UTC](https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096/3 "2019-03-06T12:05:40Z")

</div>

OK  
This is emergency for me, so I try to ping some people to get help quickly.

---

<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:** [March 6, 2019, 1:07pm UTC](https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096/4 "2019-03-06T13:07:17Z")

</div>

This is forum manned by volunteers and is not anything like a professional support with SLAs and things like that.

Read [this](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer but please don't do that kind of ping again in the future.

---

<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 3, 2019, 1:07pm UTC](https://discuss.elastic.co/t/how-to-add-additional-data-when-using-scriptengineservice-and-return-as-part-of-result/171096/5 "2019-04-03T13:07:17Z")

</div>

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