# Duplicate data

**URL:** <https://discuss.elastic.co/t/duplicate-data/363091>\
**Category:** Elasticsearch\
**Created:** [July 14, 2024, 8:28am UTC](https://discuss.elastic.co/t/duplicate-data/363091 "2024-07-14T08:28:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsagent](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dsagent](https://discuss.elastic.co/u/dsagent)\
**Post date:** [July 14, 2024, 8:28am UTC](https://discuss.elastic.co/t/duplicate-data/363091/1 "2024-07-14T08:28:46Z")

</div>

I have an indicator with duplicate data I want to delete this duplicate data and keep only one and the rest of the duplicates are deleted  
I want to do this operation periodically  
What is the best practice to do this?

Please help

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [July 15, 2024, 11:52am UTC](https://discuss.elastic.co/t/duplicate-data/363091/2 "2024-07-15T11:52:14Z")

</div>

Hello,

In which stage are you currently?

1. Have you already identified duplicate records?
2. Have you created a scripted query to find duplicates?
3. Do you want to remove duplicates periodically?

---

<div class="post-metadata">

**Author:** ![dsagent](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dsagent](https://discuss.elastic.co/u/dsagent)\
**Post date:** [July 15, 2024, 2:58pm UTC](https://discuss.elastic.co/t/duplicate-data/363091/3 "2024-07-15T14:58:13Z")

</div>

[quote="Alex\_Salgado-Elastic, post:2, topic:363091, full:true"]  
Hello,

In which stage are you currently?

1. Have you already identified duplicate records?
2. Have you created a scripted query to find duplicates?
3. Do you want to remove duplicates periodically?  
[/quote]Hello  
Yes, I did that, and when deleting, it deletes all data that matches the condition, and I want it to delete the duplicate only and keep its single value.

I want the deletion to be done dynamically

---

<div class="post-metadata">

**Author:** ![dsagent](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@dsagent](https://discuss.elastic.co/u/dsagent)\
**Post date:** [July 15, 2024, 2:58pm UTC](https://discuss.elastic.co/t/duplicate-data/363091/4 "2024-07-15T14:58:53Z")

</div>

Hello  
Yes, I did that, and when deleting, it deletes all data that matches the condition, and I want it to delete the duplicate only and keep its single value.

I want the deletion to be done dynamically
