# Curator, delete some data from within index

**URL:** <https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041>\
**Category:** Elasticsearch\
**Created:** [April 30, 2018, 3:37pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041 "2018-04-30T15:37:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![papebadiane](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@papebadiane](https://discuss.elastic.co/u/papebadiane)\
**Post date:** [April 30, 2018, 3:37pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041/1 "2018-04-30T15:37:44Z")

</div>

Hello, i want to delete some rows older that 10 days from my index with Elastic Curator with the following action

```auto
actions:
  1:
    action: delete_indices
    description: >-
      Delete indices older than 10 days based on apps-logs indices
    options:
      ignore_empty_list: True
      disable_action: True
    filters:
    - filtertype: pattern
      kind: prefix
      value: apps-logs
    - filtertype: age
      source: creation_date
      unit: days
      unit_count: 10
      direction: older

```

result : it delete the index

I want to know if it is possible to delete just certain rows from the index

Thank's

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [April 30, 2018, 3:50pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041/2 "2018-04-30T15:50:18Z")

</div>

Curator does every action at the index level. In order to delete at the document level, you will need to research `delete_by_query`.

---

<div class="post-metadata">

**Author:** ![papebadiane](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@papebadiane](https://discuss.elastic.co/u/papebadiane)\
**Post date:** [May 1, 2018, 9:20pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041/3 "2018-05-01T21:20:55Z")

</div>

Thank's for your answer.  
If i understand that you say, i will do reseearch about older documents and delete it with kibana API or with curl request ??

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 1, 2018, 9:41pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041/4 "2018-05-01T21:41:41Z")

</div>

Yes. You will need to use Kibana Console, or curl, or some other means of making an API call to issue a `delete_by_query`.

As a relevant aside, if your data is time-series (like logs, or other timestamp + data documents), then `delete_by_query` is not likely the best approach. Using individual indices that contain intervals of time-series documents is a better approach. Curator can handle these situations.

---

<div class="post-metadata">

**Author:** ![papebadiane](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@papebadiane](https://discuss.elastic.co/u/papebadiane)\
**Post date:** [May 1, 2018, 9:59pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041/5 "2018-05-01T21:59:21Z")

</div>

👍

---

<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:** [May 29, 2018, 9:59pm UTC](https://discuss.elastic.co/t/curator-delete-some-data-from-within-index/130041/6 "2018-05-29T21:59:26Z")

</div>

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