# Add value to a previously indexed field with logstash

**URL:** <https://discuss.elastic.co/t/add-value-to-a-previously-indexed-field-with-logstash/347940>\
**Category:** Logstash\
**Created:** [November 24, 2023, 3:25pm UTC](https://discuss.elastic.co/t/add-value-to-a-previously-indexed-field-with-logstash/347940 "2023-11-24T15:25:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk-user-0001](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@elk-user-0001](https://discuss.elastic.co/u/elk-user-0001)\
**Post date:** [November 24, 2023, 3:25pm UTC](https://discuss.elastic.co/t/add-value-to-a-previously-indexed-field-with-logstash/347940/1 "2023-11-24T15:25:21Z")

</div>

Hello!

I have a pipeline that has many inputs ( 19 ) and I use the update on the output using a document\_id to avoid duplicates and the elasticsearch filter and update the values.

Is it possible to add the value of a field to the same field already indexed ? I want to add the new value in each update forming an array in elastic.

example:

indexed document:

`Field: Value1`

after the update

`Field: "Value1", "Value2", "Value3".`

I have tried several things with the following idea but without success.

`script => ' ctx._source.Field.add("%{[Field]}") '`

Could someone help me ?

Thanks in advance colleagues!

---

<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:** [December 22, 2023, 3:26pm UTC](https://discuss.elastic.co/t/add-value-to-a-previously-indexed-field-with-logstash/347940/2 "2023-12-22T15:26:10Z")

</div>

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