# The data in the index, how to achieve based on time to delete the content inside?

**URL:** <https://discuss.elastic.co/t/the-data-in-the-index-how-to-achieve-based-on-time-to-delete-the-content-inside/133999>\
**Category:** Elasticsearch\
**Created:** [May 31, 2018, 8:26am UTC](https://discuss.elastic.co/t/the-data-in-the-index-how-to-achieve-based-on-time-to-delete-the-content-inside/133999 "2018-05-31T08:26:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuwenjie\_cn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wuwenjie_cn/32/32514_2.png) [@wuwenjie\_cn](https://discuss.elastic.co/u/wuwenjie_cn)\
**Post date:** [May 31, 2018, 8:26am UTC](https://discuss.elastic.co/t/the-data-in-the-index-how-to-achieve-based-on-time-to-delete-the-content-inside/133999/1 "2018-05-31T08:26:20Z")

</div>

The data in the index, how to achieve based on time to delete the content inside?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 31, 2018, 8:34am UTC](https://discuss.elastic.co/t/the-data-in-the-index-how-to-achieve-based-on-time-to-delete-the-content-inside/133999/2 "2018-05-31T08:34:34Z")

</div>

You need to use delete-by-query and run it via a scheduler.

---

<div class="post-metadata">

**Author:** ![wuwenjie\_cn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wuwenjie_cn/32/32514_2.png) [@wuwenjie\_cn](https://discuss.elastic.co/u/wuwenjie_cn)\
**Post date:** [June 7, 2018, 10:54am UTC](https://discuss.elastic.co/t/the-data-in-the-index-how-to-achieve-based-on-time-to-delete-the-content-inside/133999/3 "2018-06-07T10:54:06Z")

</div>

Thanks.

---

<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:** [July 5, 2018, 11:02am UTC](https://discuss.elastic.co/t/the-data-in-the-index-how-to-achieve-based-on-time-to-delete-the-content-inside/133999/4 "2018-07-05T11:02:15Z")

</div>

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