# Delete values from elastricsearch domain

**URL:** <https://discuss.elastic.co/t/delete-values-from-elastricsearch-domain/93352>\
**Category:** Elasticsearch\
**Created:** [July 17, 2017, 8:07am UTC](https://discuss.elastic.co/t/delete-values-from-elastricsearch-domain/93352 "2017-07-17T08:07:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![laspal](https://avatars.discourse-cdn.com/v4/letter/l/c6cbf5/32.png) [@laspal](https://discuss.elastic.co/u/laspal)\
**Post date:** [July 17, 2017, 8:07am UTC](https://discuss.elastic.co/t/delete-values-from-elastricsearch-domain/93352/1 "2017-07-17T08:07:56Z")

</div>

Hi ,

I have a unique requirement .  
I have index as 'apps-dev-logs' which filed type as ( 'created\_on, msg, log, ...)  
So my requirement is to deleted all values from elastricsearch domain on created\_on filter.

So any values older then (now -45 days) should be deleted from eleatricsearch domain for partuclar index.  
I am using python to create index.

actions = [{  
"\_index": index\_name,  
"\_type": doc\_type,  
"\_source": doc,  
"\_id": doc['filename'] + '--' + str(doc['created\_on'])  
} for doc in json\_list]

helpers.bulk(esClient, actions)

---

<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:** [August 14, 2017, 8:08am UTC](https://discuss.elastic.co/t/delete-values-from-elastricsearch-domain/93352/2 "2017-08-14T08:08:13Z")

</div>

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