# Pass Entire Document into Update Script Params

**URL:** <https://discuss.elastic.co/t/pass-entire-document-into-update-script-params/224014>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [March 18, 2020, 2:24am UTC](https://discuss.elastic.co/t/pass-entire-document-into-update-script-params/224014 "2020-03-18T02:24:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weizilla](https://avatars.discourse-cdn.com/v4/letter/w/8e7dd6/32.png) [@weizilla](https://discuss.elastic.co/u/weizilla)\
**Post date:** [March 18, 2020, 2:24am UTC](https://discuss.elastic.co/t/pass-entire-document-into-update-script-params/224014/1 "2020-03-18T02:24:11Z")

</div>

According to [Update settings (when writing to Elasticsearch)](https://www.elastic.co/guide/en/elasticsearch/hadoop/current/configuration.html#cfg-update), I can provide a list of fields to be passed into my update script `params` with `es.update.script.params`. Is there a way to say I want the entire document being indexed to be passed in? Essentially all fields without explicitly listing each one?

I realize I could just wrap the whole document in a single dummy field and list that in `params` but I'm performing upserts and don't want that dummy wrapper in the document if it does an insert.

I'm using `es.input.json = true`

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [March 18, 2020, 5:12pm UTC](https://discuss.elastic.co/t/pass-entire-document-into-update-script-params/224014/2 "2020-03-18T17:12:42Z")

</div>

Hmm, this is an interesting use case. I've never really thought of that before. Worth opening an enhancement issue on the [github project](https://github.com/elastic/elasticsearch-hadoop).

---

<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 15, 2020, 5:12pm UTC](https://discuss.elastic.co/t/pass-entire-document-into-update-script-params/224014/3 "2020-04-15T17:12:56Z")

</div>

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