# Duplicates in ES Index

**URL:** <https://discuss.elastic.co/t/duplicates-in-es-index/256736>\
**Category:** Logstash\
**Created:** [November 26, 2020, 8:32am UTC](https://discuss.elastic.co/t/duplicates-in-es-index/256736 "2020-11-26T08:32:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jafri6](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@jafri6](https://discuss.elastic.co/u/jafri6)\
**Post date:** [November 26, 2020, 8:32am UTC](https://discuss.elastic.co/t/duplicates-in-es-index/256736/1 "2020-11-26T08:32:43Z")

</div>

My ELK Stack is running a process which collects logs from 5-6 different PCs.  
The only issue I am facing at the moment is, my ES index is logging multiple entries for the same timestamp.

Any suggestions on how I can fix and remove the duplicates?

The following is an example of how the data is indexed. All 4 entries have the exact same data and I just need one of these. -\> This affects the dashboards and the results that we're trying to observe.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/9/59a10371c5d32eca3431c19e7ab26139185d211c.png)

---

<div class="post-metadata">

**Author:** ![Raynald](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raynald/32/78897_2.png) [@Raynald](https://discuss.elastic.co/u/Raynald)\
**Post date:** [December 4, 2020, 5:28pm UTC](https://discuss.elastic.co/t/duplicates-in-es-index/256736/2 "2020-12-04T17:28:55Z")

</div>

You can add this in your output, and then you will have 'update' on doc, and no more duplicates.

`document_id => "%{[field_with_same_value_for_duplicate_docs]}"`

---

<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:** [January 1, 2021, 5:29pm UTC](https://discuss.elastic.co/t/duplicates-in-es-index/256736/3 "2021-01-01T17:29:25Z")

</div>

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