# Dedupe Identification and delete the Old entries of unique key like Task Id

**URL:** <https://discuss.elastic.co/t/dedupe-identification-and-delete-the-old-entries-of-unique-key-like-task-id/365841>\
**Category:** Elasticsearch\
**Tags:** painless\
**Created:** [August 30, 2024, 7:45pm UTC](https://discuss.elastic.co/t/dedupe-identification-and-delete-the-old-entries-of-unique-key-like-task-id/365841 "2024-08-30T19:45:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Macherla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aditya_macherla/32/122177_2.png) [@Aditya\_Macherla](https://discuss.elastic.co/u/Aditya_Macherla)\
**Post date:** [August 30, 2024, 7:45pm UTC](https://discuss.elastic.co/t/dedupe-identification-and-delete-the-old-entries-of-unique-key-like-task-id/365841/1 "2024-08-30T19:45:06Z")

</div>

Hello, We have recently moved all the Tasks from Java Application to ELK Stack but we understood duplicates got created in the ELK. We are getting incorrect reports because of it. We have a volume of 40 million records. We want to create a Job in painless(or other way) to Identify all the duplicates and delete the old entries in the ELK. I was thinking pick records in batches, and then for each task Id, fetch all task Id's and delete the old entries. That should solve problem.

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [August 30, 2024, 8:58pm UTC](https://discuss.elastic.co/t/dedupe-identification-and-delete-the-old-entries-of-unique-key-like-task-id/365841/2 "2024-08-30T20:58:24Z")

</div>

Category updated on August 30, 2024, 8:58pm UTC

From #Elastic Search to #Elasticsearch

---

<div class="post-metadata">

**Author:** ![Sean\_Story](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sean_story/32/69987_2.png) [@Sean\_Story](https://discuss.elastic.co/u/Sean_Story)\
**Post date:** [August 30, 2024, 8:58pm UTC](https://discuss.elastic.co/t/dedupe-identification-and-delete-the-old-entries-of-unique-key-like-task-id/365841/3 "2024-08-30T20:58:24Z")

</div>

Tags updated on August 30, 2024, 8:58pm UTC

Removed #elastic-app-search

---

<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:** [September 27, 2024, 8:58pm UTC](https://discuss.elastic.co/t/dedupe-identification-and-delete-the-old-entries-of-unique-key-like-task-id/365841/4 "2024-09-27T20:58:59Z")

</div>

Closed on September 27, 2024, 8:58pm UTC

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