# Delete Records in ES

**URL:** <https://discuss.elastic.co/t/delete-records-in-es/16660>\
**Category:** Elasticsearch\
**Created:** [March 27, 2014, 9:34pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660 "2014-03-27T21:34:45Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Prasath](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Arun\_Prasath](https://discuss.elastic.co/u/Arun_Prasath)\
**Post date:** [March 27, 2014, 9:34pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/1 "2014-03-27T21:34:45Z")

</div>

Hi,

I would need to delete records from particular Type with date range. I'm  
trying following command but it deletes all records from index.

Is it right way to delete records.

DELETE /index/type/  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to"  
: "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 27, 2014, 9:55pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/2 "2014-03-27T21:55:05Z")

</div>

Use range not term

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 27 mars 2014 à 22:34, Arun Prasath [arun.available@gmail.com](mailto:arun.available@gmail.com) a écrit :
> 
> Hi,
> 
> I would need to delete records from particular Type with date range. I'm trying following command but it deletes all records from index.
> 
> Is it right way to delete records.
> 
> DELETE /index/type/  
> {  
> "query" : {  
> "term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
> }  
> }
> 
> Thanks,  
> Arun
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2EB5CFC7-262D-418C-A353-A39AE982E81D%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/2EB5CFC7-262D-418C-A353-A39AE982E81D%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arun\_Prasath](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Arun\_Prasath](https://discuss.elastic.co/u/Arun_Prasath)\
**Post date:** [March 28, 2014, 1:55pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/3 "2014-03-28T13:55:04Z")

</div>

I tried in both the case it deletes complete index when criteria doesn't  
match. It should not delete if the condition doesn't match.

Please let me know how to delete based on condition. Im trying this as TTL  
doesn't work. I don't know how to delete records from memory for particular  
date range.

Appreicate your Help.

On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:

> Use range not term
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 27 mars 2014 à 22:34, Arun Prasath \<[arun.av...@gmail.com](mailto:arun.av...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> Hi,
> 
> I would need to delete records from particular Type with date range. I'm  
> trying following command but it deletes all records from index.
> 
> Is it right way to delete records.
> 
> DELETE /index/type/  
> {  
> "query" : {  
> "term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> "to" : "2014-03-26 12:24:40"}  
> }  
> }
> 
> Thanks,  
> Arun
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2014, 1:57pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/4 "2014-03-28T13:57:26Z")

</div>

Could you GIST a full curl recreation which reproduce your issue?

See help if you don't know how to write it: [http://www.elasticsearch.org/help](http://www.elasticsearch.org/help)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.available@gmail.com](mailto:arun.available@gmail.com)) a écrit:

I tried in both the case it deletes complete index when criteria doesn't match. It should not delete if the condition doesn't match.

Please let me know how to delete based on condition. Im trying this as TTL doesn't work. I don't know how to delete records from memory for particular date range.

Appreicate your Help.

On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:  
Use range not term

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :

Hi,

I would need to delete records from particular Type with date range. I'm trying following command but it deletes all records from index.

Is it right way to delete records.

DELETE /index/type/  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53357fc6.238e1f29.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53357fc6.238e1f29.16bdd%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arun\_Prasath](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Arun\_Prasath](https://discuss.elastic.co/u/Arun_Prasath)\
**Post date:** [March 28, 2014, 1:59pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/5 "2014-03-28T13:59:57Z")

</div>

David,

I'm using following command in Sense. Is this correct ?

Index - local-test  
Type - logs-test

DELETE /local-test/logs-test/  
{  
"query" : {  
"range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
"to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:

> Could you GIST a full curl recreation which reproduce your issue?
> 
> See help if you don't know how to write it:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> I tried in both the case it deletes complete index when criteria doesn't  
> match. It should not delete if the condition doesn't match.
> 
> Please let me know how to delete based on condition. Im trying this as TTL  
> doesn't work. I don't know how to delete records from memory for particular  
> date range.
> 
> Appreicate your Help.
> 
> On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:
> 
> > Use range not term
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :
> > 
> > Hi,
> > 
> > I would need to delete records from particular Type with date range. I'm  
> > trying following command but it deletes all records from index.
> > 
> > Is it right way to delete records.
> > 
> > DELETE /index/type/  
> > {  
> > "query" : {  
> > "term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > "to" : "2014-03-26 12:24:40"}  
> > }  
> > }
> > 
> > Thanks,  
> > Arun
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2014, 2:03pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/6 "2014-03-28T14:03:34Z")

</div>

Hmmm… Wondering if SENSE support payload when using DELETE method…

Could you try with curl?  
Could you check also your date format. I think it's wrong.

If none of those works, please create a full curl recreation.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.available@gmail.com](mailto:arun.available@gmail.com)) a écrit:

David,

I'm using following command in Sense. Is this correct ?

Index - local-test  
Type - logs-test

DELETE /local-test/logs-test/  
{  
"query" : {  
"range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:  
Could you GIST a full curl recreation which reproduce your issue?

See help if you don't know how to write it: [http://www.elasticsearch.org/help](http://www.elasticsearch.org/help)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

I tried in both the case it deletes complete index when criteria doesn't match. It should not delete if the condition doesn't match.

Please let me know how to delete based on condition. Im trying this as TTL doesn't work. I don't know how to delete records from memory for particular date range.

Appreicate your Help.

On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:  
Use range not term

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :

Hi,

I would need to delete records from particular Type with date range. I'm trying following command but it deletes all records from index.

Is it right way to delete records.

DELETE /index/type/  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53358136.2eb141f2.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53358136.2eb141f2.16bdd%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arun\_Prasath](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Arun\_Prasath](https://discuss.elastic.co/u/Arun_Prasath)\
**Post date:** [March 28, 2014, 2:09pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/7 "2014-03-28T14:09:03Z")

</div>

Sorry.. Could you try with curl? - I don't know how to do this and where  
to execute curl. Could you please help me here.

Should i execute curl in Fiddler or in Sense ?

On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:

> Hmmm… Wondering if SENSE support payload when using DELETE method…
> 
> Could you try with curl?  
> Could you check also your date format. I think it's wrong.
> 
> If none of those works, please create a full curl recreation.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> David,
> 
> I'm using following command in Sense. Is this correct ?
> 
> Index - local-test  
> Type - logs-test
> 
> DELETE /local-test/logs-test/  
> {  
> "query" : {  
> "range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> "to" : "2014-03-26 12:24:40"}  
> }  
> }
> 
> Thanks,  
> Arun
> 
> On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:
> 
> > Could you GIST a full curl recreation which reproduce your issue?
> > 
> > See help if you don't know how to write it:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> > 
> > ```
> > -- 
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > 
> > I tried in both the case it deletes complete index when criteria  
> > doesn't match. It should not delete if the condition doesn't match.
> > 
> > Please let me know how to delete based on condition. Im trying this as  
> > TTL doesn't work. I don't know how to delete records from memory for  
> > particular date range.
> > 
> > Appreicate your Help.
> > 
> > On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:
> > 
> > > Use range not term
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :
> > > 
> > > Hi,
> > > 
> > > I would need to delete records from particular Type with date range. I'm  
> > > trying following command but it deletes all records from index.
> > > 
> > > Is it right way to delete records.
> > > 
> > > DELETE /index/type/  
> > > {  
> > > "query" : {  
> > > "term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > > "to" : "2014-03-26 12:24:40"}  
> > > }  
> > > }
> > > 
> > > Thanks,  
> > > Arun
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2014, 2:27pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/8 "2014-03-28T14:27:39Z")

</div>

Ok. Thanks to Boaz for finding it.  
You did not run a DELETE by query: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query)

But a DELETE MAPPING: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping)

You need to add \_query at the end.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:09:07, Arun Prasath ([arun.available@gmail.com](mailto:arun.available@gmail.com)) a écrit:

Sorry.. Could you try with curl? - I don't know how to do this and where to execute curl. Could you please help me here.

Should i execute curl in Fiddler or in Sense ?

On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:  
Hmmm… Wondering if SENSE support payload when using DELETE method…

Could you try with curl?  
Could you check also your date format. I think it's wrong.

If none of those works, please create a full curl recreation.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

David,

I'm using following command in Sense. Is this correct ?

Index - local-test  
Type - logs-test

DELETE /local-test/logs-test/  
{  
"query" : {  
"range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:  
Could you GIST a full curl recreation which reproduce your issue?

See help if you don't know how to write it: [http://www.elasticsearch.org/help](http://www.elasticsearch.org/help)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

I tried in both the case it deletes complete index when criteria doesn't match. It should not delete if the condition doesn't match.

Please let me know how to delete based on condition. Im trying this as TTL doesn't work. I don't know how to delete records from memory for particular date range.

Appreicate your Help.

On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:  
Use range not term

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :

Hi,

I would need to delete records from particular Type with date range. I'm trying following command but it deletes all records from index.

Is it right way to delete records.

DELETE /index/type/  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.533586db.515f007c.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.533586db.515f007c.16bdd%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arun\_Prasath](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Arun\_Prasath](https://discuss.elastic.co/u/Arun_Prasath)\
**Post date:** [March 28, 2014, 2:50pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/9 "2014-03-28T14:50:51Z")

</div>

I did , now it doesn't delete mapping/index but still records are not  
getting deleted for the given condition.

I tried in both curl and Sense. Is the format correct. It it right way to  
delete records for date range.

DELETE /local-test/logs-test/\_query  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2013-08-01", "to" :  
"2014-03-27"}  
}  
}

Apreciate your Help.

On Friday, March 28, 2014 10:27:39 AM UTC-4, David Pilato wrote:

> Ok. Thanks to Boaz for finding it.  
> You did not run a DELETE by query:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query)
> 
> But a DELETE MAPPING:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping)
> 
> You need to add \_query at the end.
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 28 mars 2014 à 15:09:07, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> Sorry.. Could you try with curl? - I don't know how to do this and  
> where to execute curl. Could you please help me here.
> 
> Should i execute curl in Fiddler or in Sense ?
> 
> On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:
> 
> > Hmmm… Wondering if SENSE support payload when using DELETE method…
> > 
> > Could you try with curl?  
> > Could you check also your date format. I think it's wrong.
> > 
> > If none of those works, please create a full curl recreation.
> > 
> > ```
> > -- 
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > 
> > David,
> > 
> > I'm using following command in Sense. Is this correct ?
> > 
> > Index - local-test  
> > Type - logs-test
> > 
> > DELETE /local-test/logs-test/  
> > {  
> > "query" : {  
> > "range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > "to" : "2014-03-26 12:24:40"}  
> > }  
> > }
> > 
> > Thanks,  
> > Arun
> > 
> > On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:
> > 
> > > Could you GIST a full curl recreation which reproduce your issue?
> > > 
> > > See help if you don't know how to write it:  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> > > 
> > > ```
> > > -- 
> > > 
> > > ```
> > > 
> > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > 
> > > Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > > 
> > > I tried in both the case it deletes complete index when criteria  
> > > doesn't match. It should not delete if the condition doesn't match.
> > > 
> > > Please let me know how to delete based on condition. Im trying this as  
> > > TTL doesn't work. I don't know how to delete records from memory for  
> > > particular date range.
> > > 
> > > Appreicate your Help.
> > > 
> > > On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:
> > > 
> > > > Use range not term
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :
> > > > 
> > > > Hi,
> > > > 
> > > > I would need to delete records from particular Type with date range.  
> > > > I'm trying following command but it deletes all records from index.
> > > > 
> > > > Is it right way to delete records.
> > > > 
> > > > DELETE /index/type/  
> > > > {  
> > > > "query" : {  
> > > > "term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > > > "to" : "2014-03-26 12:24:40"}  
> > > > }  
> > > > }
> > > > 
> > > > Thanks,  
> > > > Arun
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2014, 2:52pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/10 "2014-03-28T14:52:36Z")

</div>

This should fail. It's not a range query on date.  
Look at: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html#query-dsl-range-filter](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html#query-dsl-range-filter)  
or: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-query.html)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:50:57, Arun Prasath ([arun.available@gmail.com](mailto:arun.available@gmail.com)) a écrit:

I did , now it doesn't delete mapping/index but still records are not getting deleted for the given condition.

I tried in both curl and Sense. Is the format correct. It it right way to delete records for date range.

DELETE /local-test/logs-test/\_query  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2013-08-01", "to" : "2014-03-27"}  
}  
}

Apreciate your Help.

On Friday, March 28, 2014 10:27:39 AM UTC-4, David Pilato wrote:  
Ok. Thanks to Boaz for finding it.  
You did not run a DELETE by query: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query)

But a DELETE MAPPING: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping)

You need to add \_query at the end.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:09:07, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

Sorry.. Could you try with curl? - I don't know how to do this and where to execute curl. Could you please help me here.

Should i execute curl in Fiddler or in Sense ?

On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:  
Hmmm… Wondering if SENSE support payload when using DELETE method…

Could you try with curl?  
Could you check also your date format. I think it's wrong.

If none of those works, please create a full curl recreation.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

David,

I'm using following command in Sense. Is this correct ?

Index - local-test  
Type - logs-test

DELETE /local-test/logs-test/  
{  
"query" : {  
"range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:  
Could you GIST a full curl recreation which reproduce your issue?

See help if you don't know how to write it: [http://www.elasticsearch.org/help](http://www.elasticsearch.org/help)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

I tried in both the case it deletes complete index when criteria doesn't match. It should not delete if the condition doesn't match.

Please let me know how to delete based on condition. Im trying this as TTL doesn't work. I don't know how to delete records from memory for particular date range.

Appreicate your Help.

On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:  
Use range not term

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :

Hi,

I would need to delete records from particular Type with date range. I'm trying following command but it deletes all records from index.

Is it right way to delete records.

DELETE /index/type/  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53358cb4.216231b.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53358cb4.216231b.16bdd%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Arun\_Prasath](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@Arun\_Prasath](https://discuss.elastic.co/u/Arun_Prasath)\
**Post date:** [March 28, 2014, 2:58pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/11 "2014-03-28T14:58:47Z")

</div>

this query works fine, it deletes all account number. the only issue is  
with date range. does it support date range.

when i set TTL , all records should get deleted but not happening.

DELETE /local-test/logs-test/\_query  
{  
"query" : {  
"term" : { "AccountNumber" : "XXXXX"}  
}  
}

On Friday, March 28, 2014 10:52:36 AM UTC-4, David Pilato wrote:

> This should fail. It's not a range query on date.  
> Look at:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html#query-dsl-range-filter)  
> or:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-query.html)
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 28 mars 2014 à 15:50:57, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)\<javascript:\>)  
> a écrit:
> 
> I did , now it doesn't delete mapping/index but still records are not  
> getting deleted for the given condition.
> 
> I tried in both curl and Sense. Is the format correct. It it right way to  
> delete records for date range.
> 
> DELETE /local-test/logs-test/\_query  
> {  
> "query" : {  
> "term" : { "TransactionTime" : "from" : "2013-08-01", "to" :  
> "2014-03-27"}  
> }  
> }
> 
> Apreciate your Help.
> 
> On Friday, March 28, 2014 10:27:39 AM UTC-4, David Pilato wrote:
> 
> > Ok. Thanks to Boaz for finding it.  
> > You did not run a DELETE by query:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query)
> > 
> > But a DELETE MAPPING:  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping)
> > 
> > You need to add \_query at the end.
> > 
> > ```
> > -- 
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 28 mars 2014 à 15:09:07, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > 
> > Sorry.. Could you try with curl? - I don't know how to do this and  
> > where to execute curl. Could you please help me here.
> > 
> > Should i execute curl in Fiddler or in Sense ?
> > 
> > On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:
> > 
> > > Hmmm… Wondering if SENSE support payload when using DELETE method…
> > > 
> > > Could you try with curl?  
> > > Could you check also your date format. I think it's wrong.
> > > 
> > > If none of those works, please create a full curl recreation.
> > > 
> > > ```
> > > -- 
> > > 
> > > ```
> > > 
> > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > 
> > > Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > > 
> > > David,
> > > 
> > > I'm using following command in Sense. Is this correct ?
> > > 
> > > Index - local-test  
> > > Type - logs-test
> > > 
> > > DELETE /local-test/logs-test/  
> > > {  
> > > "query" : {  
> > > "range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > > "to" : "2014-03-26 12:24:40"}  
> > > }  
> > > }
> > > 
> > > Thanks,  
> > > Arun
> > > 
> > > On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:
> > > 
> > > > Could you GIST a full curl recreation which reproduce your issue?
> > > > 
> > > > See help if you don't know how to write it:  
> > > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> > > > 
> > > > ```
> > > > -- 
> > > > 
> > > > ```
> > > > 
> > > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > > 
> > > > Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a  
> > > > écrit:
> > > > 
> > > > I tried in both the case it deletes complete index when criteria  
> > > > doesn't match. It should not delete if the condition doesn't match.
> > > > 
> > > > Please let me know how to delete based on condition. Im trying this as  
> > > > TTL doesn't work. I don't know how to delete records from memory for  
> > > > particular date range.
> > > > 
> > > > Appreicate your Help.
> > > > 
> > > > On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:
> > > > 
> > > > > Use range not term
> > > > > 
> > > > > --  
> > > > > David 😉  
> > > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > > 
> > > > > Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I would need to delete records from particular Type with date range.  
> > > > > I'm trying following command but it deletes all records from index.
> > > > > 
> > > > > Is it right way to delete records.
> > > > > 
> > > > > DELETE /index/type/  
> > > > > {  
> > > > > "query" : {  
> > > > > "term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > > > > "to" : "2014-03-26 12:24:40"}  
> > > > > }  
> > > > > }
> > > > > 
> > > > > Thanks,  
> > > > > Arun
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 28, 2014, 3:08pm UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/12 "2014-03-28T15:08:07Z")

</div>

I don't think this is a correct query

{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2013-08-01", "to" : "2014-03-27"}  
}  
}

Just try to parse it with: [http://jsonformatter.curiousconcept.com/](http://jsonformatter.curiousconcept.com/)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:58:52, Arun Prasath ([arun.available@gmail.com](mailto:arun.available@gmail.com)) a écrit:

this query works fine, it deletes all account number. the only issue is with date range. does it support date range.

when i set TTL , all records should get deleted but not happening.

DELETE /local-test/logs-test/\_query  
{  
"query" : {  
"term" : { "AccountNumber" : "XXXXX"}  
}  
}

On Friday, March 28, 2014 10:52:36 AM UTC-4, David Pilato wrote:  
This should fail. It's not a range query on date.  
Look at: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html#query-dsl-range-filter](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-filter.html#query-dsl-range-filter)  
or: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-query.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-range-query.html)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:50:57, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

I did , now it doesn't delete mapping/index but still records are not getting deleted for the given condition.

I tried in both curl and Sense. Is the format correct. It it right way to delete records for date range.

DELETE /local-test/logs-test/\_query  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2013-08-01", "to" : "2014-03-27"}  
}  
}

Apreciate your Help.

On Friday, March 28, 2014 10:27:39 AM UTC-4, David Pilato wrote:  
Ok. Thanks to Boaz for finding it.  
You did not run a DELETE by query: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html#docs-delete-by-query)

But a DELETE MAPPING: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-delete-mapping.html#indices-delete-mapping)

You need to add \_query at the end.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:09:07, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

Sorry.. Could you try with curl? - I don't know how to do this and where to execute curl. Could you please help me here.

Should i execute curl in Fiddler or in Sense ?

On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:  
Hmmm… Wondering if SENSE support payload when using DELETE method…

Could you try with curl?  
Could you check also your date format. I think it's wrong.

If none of those works, please create a full curl recreation.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

David,

I'm using following command in Sense. Is this correct ?

Index - local-test  
Type - logs-test

DELETE /local-test/logs-test/  
{  
"query" : {  
"range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:  
Could you GIST a full curl recreation which reproduce your issue?

See help if you don't know how to write it: [http://www.elasticsearch.org/help](http://www.elasticsearch.org/help)

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr

Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:

I tried in both the case it deletes complete index when criteria doesn't match. It should not delete if the condition doesn't match.

Please let me know how to delete based on condition. Im trying this as TTL doesn't work. I don't know how to delete records from memory for particular date range.

Appreicate your Help.

On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:  
Use range not term

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a écrit :

Hi,

I would need to delete records from particular Type with date range. I'm trying following command but it deletes all records from index.

Is it right way to delete records.

DELETE /index/type/  
{  
"query" : {  
"term" : { "TransactionTime" : "from" : "2014-03-26 12:23:41", "to" : "2014-03-26 12:24:40"}  
}  
}

Thanks,  
Arun

## -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.53359057.140e0f76.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53359057.140e0f76.16bdd%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Petter\_Abrahamsson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/petter_abrahamsson/32/1678_2.png) [@Petter\_Abrahamsson](https://discuss.elastic.co/u/Petter_Abrahamsson)\
**Post date:** [March 29, 2014, 8:57am UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/13 "2014-03-29T08:57:54Z")

</div>

Arun,

This is a query that I've used for delete-by-query.  
However, delete-by-query can be very expensive on your system [1] so be  
careful with how you use this.

DELETE \_query -d '{  
"query":{  
"bool":{  
"must":[  
{  
"range":{  
"logs.@timestamp":{  
"from":"2014-01-01",  
"to":"2014-03-01"  
}  
}  
}  
],  
"must\_not":,  
"should":  
}  
}  
}'

[1]

> **[Keeping Elasticsearch in Sync](https://www.elastic.co/blog/found-keeping-elasticsearch-in-sync)**
>
> One of the trickiest parts of integrating Elasticsearch into an existing app is figuring out how to manage the flow of data from an authoritative data source, such as an SQL database, into Elasticsearch. In most cases this means utilizing...

/petter

On Fri, Mar 28, 2014 at 11:08 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I don't think this is a correct query
> 
> {  
> "query" : {  
> "term" : { "TransactionTime" : "from" : "2013-08-01", "to" :  
> "2014-03-27"}  
> }  
> }
> 
> Just try to parse it with: [http://jsonformatter.curiousconcept.com/](http://jsonformatter.curiousconcept.com/)
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> 
> Le 28 mars 2014 à 15:58:52, Arun Prasath ([arun.available@gmail.com](mailto:arun.available@gmail.com)) a  
> écrit:
> 
> this query works fine, it deletes all account number. the only issue is  
> with date range. does it support date range.
> 
> when i set TTL , all records should get deleted but not happening.
> 
> DELETE /local-test/logs-test/\_query  
> {  
> "query" : {  
> "term" : { "AccountNumber" : "XXXXX"}  
> }  
> }
> 
> On Friday, March 28, 2014 10:52:36 AM UTC-4, David Pilato wrote:
> 
> > This should fail. It's not a range query on date.  
> > Look at: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/)  
> > reference/current/query-dsl-range-filter.html#query-dsl-range-filter  
> > or: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/)  
> > reference/current/query-dsl-range-query.html
> > 
> > ```
> > --
> > 
> > ```
> > 
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > 
> > Le 28 mars 2014 à 15:50:57, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > 
> > I did , now it doesn't delete mapping/index but still records are not  
> > getting deleted for the given condition.
> > 
> > I tried in both curl and Sense. Is the format correct. It it right way to  
> > delete records for date range.
> > 
> > DELETE /local-test/logs-test/\_query  
> > {  
> > "query" : {  
> > "term" : { "TransactionTime" : "from" : "2013-08-01", "to" :  
> > "2014-03-27"}  
> > }  
> > }
> > 
> > Apreciate your Help.
> > 
> > On Friday, March 28, 2014 10:27:39 AM UTC-4, David Pilato wrote:
> > 
> > > Ok. Thanks to Boaz for finding it.  
> > > You did not run a DELETE by query: [http://www](http://www).  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/en/elasticsearch/reference/)  
> > > current/docs-delete-by-query.html#docs-delete-by-query
> > > 
> > > But a DELETE MAPPING: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/)  
> > > elasticsearch/reference/current/indices-delete-  
> > > mapping.html#indices-delete-mapping
> > > 
> > > You need to add \_query at the end.
> > > 
> > > ```
> > > --
> > > 
> > > ```
> > > 
> > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > 
> > > Le 28 mars 2014 à 15:09:07, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a écrit:
> > > 
> > > Sorry.. Could you try with curl? - I don't know how to do this and  
> > > where to execute curl. Could you please help me here.
> > > 
> > > Should i execute curl in Fiddler or in Sense ?
> > > 
> > > On Friday, March 28, 2014 10:03:34 AM UTC-4, David Pilato wrote:
> > > 
> > > > Hmmm... Wondering if SENSE support payload when using DELETE method...
> > > > 
> > > > Could you try with curl?  
> > > > Could you check also your date format. I think it's wrong.
> > > > 
> > > > If none of those works, please create a full curl recreation.
> > > > 
> > > > ```
> > > > --
> > > > 
> > > > ```
> > > > 
> > > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > > 
> > > > Le 28 mars 2014 à 15:00:01, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a  
> > > > écrit:
> > > > 
> > > > David,
> > > > 
> > > > I'm using following command in Sense. Is this correct ?
> > > > 
> > > > Index - local-test  
> > > > Type - logs-test
> > > > 
> > > > DELETE /local-test/logs-test/  
> > > > {  
> > > > "query" : {  
> > > > "range" : { "TransactionTime" : "from" : "2014-03-26 12:23:41",  
> > > > "to" : "2014-03-26 12:24:40"}  
> > > > }  
> > > > }
> > > > 
> > > > Thanks,  
> > > > Arun
> > > > 
> > > > On Friday, March 28, 2014 9:57:26 AM UTC-4, David Pilato wrote:
> > > > 
> > > > > Could you GIST a full curl recreation which reproduce your issue?
> > > > > 
> > > > > See help if you don't know how to write it: [http://www.elasticsearch](http://www.elasticsearch).  
> > > > > org/help
> > > > > 
> > > > > ```
> > > > > --
> > > > > 
> > > > > ```
> > > > > 
> > > > > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > > > > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)
> > > > > 
> > > > > Le 28 mars 2014 à 14:55:09, Arun Prasath ([arun.av...@gmail.com](mailto:arun.av...@gmail.com)) a  
> > > > > écrit:
> > > > > 
> > > > > I tried in both the case it deletes complete index when criteria  
> > > > > doesn't match. It should not delete if the condition doesn't match.
> > > > > 
> > > > > Please let me know how to delete based on condition. Im trying this as  
> > > > > TTL doesn't work. I don't know how to delete records from memory for  
> > > > > particular date range.
> > > > > 
> > > > > Appreicate your Help.
> > > > > 
> > > > > On Thursday, March 27, 2014 5:55:05 PM UTC-4, David Pilato wrote:
> > > > > 
> > > > > > Use range not term
> > > > > > 
> > > > > > --  
> > > > > > David 😉  
> > > > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > > > 
> > > > > > Le 27 mars 2014 à 22:34, Arun Prasath [arun.av...@gmail.com](mailto:arun.av...@gmail.com) a  
> > > > > > écrit :
> > > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > I would need to delete records from particular Type with date range.  
> > > > > > I'm trying following command but it deletes all records from index.
> > > > > > 
> > > > > > Is it right way to delete records.
> > > > > > 
> > > > > > DELETE /index/type/  
> > > > > > {  
> > > > > > "query" : {  
> > > > > > "term" : { "TransactionTime" : "from" : "2014-03-26  
> > > > > > 12:23:41", "to" : "2014-03-26 12:24:40"}  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > Thanks,  
> > > > > > Arun
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it,  
> > > > > > send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%  
> > > > > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/32ae7629-abd6-49fe-87a8-06dd075ed2a9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > .  
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%  
> > > > > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8bcbddec-294d-4c0b-93be-b52b376fa0c3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > .  
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%  
> > > > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e7caf4c7-5320-4568-ba8e-41efa6d4c24c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%  
> > > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/700353da-0f42-444f-84ad-3d1ff2615741%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%  
> > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/3e7d9d0a-41b5-4270-a200-b45583022fde%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/11c3c3af-0814-43ea-b853-22182450a601%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.53359057.140e0f76.16bdd%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.53359057.140e0f76.16bdd%40MacBook-Air-de-David.local)[https://groups.google.com/d/msgid/elasticsearch/etPan.53359057.140e0f76.16bdd%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.53359057.140e0f76.16bdd%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALAhT\_g2j%3Ddf-hGJb7k%3DGOxg8QeW1GBNWQNPuQEb8E%2BpSGGpSg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALAhT_g2j%3Ddf-hGJb7k%3DGOxg8QeW1GBNWQNPuQEb8E%2BpSGGpSg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:39am UTC](https://discuss.elastic.co/t/delete-records-in-es/16660/14 "2017-07-06T01:39:46Z")

</div>


