# How to update if document\_id is not unique

**URL:** https://discuss.elastic.co/t/how-to-update-if-document-id-is-not-unique/200010
**Category:** Logstash
**Created:** [September 18, 2019, 1:00pm UTC](https://discuss.elastic.co/t/how-to-update-if-document-id-is-not-unique/200010 "2019-09-18T13:00:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Maria\_Efimova](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maria_efimova/32/45572_2.png) [@Maria\_Efimova](https://discuss.elastic.co/u/Maria_Efimova)
#### Post date: [September 18, 2019, 1:00pm UTC](https://discuss.elastic.co/t/how-to-update-if-document-id-is-not-unique/200010/1 "2019-09-18T13:00:08Z")

</div>

My output is elasticsearch. All documents with a field A="some\_value" has to be updated. The field A is not unique. The unique \_id=AB where A is the field I am compare to and B is another field.

How it can be done in logstash?

Many thanks for reading and helping

---

<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: [October 16, 2019, 1:00pm UTC](https://discuss.elastic.co/t/how-to-update-if-document-id-is-not-unique/200010/2 "2019-10-16T13:00:09Z")

</div>

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