# Does DELETE\_BY\_QUERY work with Index Sorting in ES 6.0?

**URL:** https://discuss.elastic.co/t/does-delete-by-query-work-with-index-sorting-in-es-6-0/123813
**Category:** Elasticsearch
**Created:** [March 13, 2018, 10:02pm UTC](https://discuss.elastic.co/t/does-delete-by-query-work-with-index-sorting-in-es-6-0/123813 "2018-03-13T22:02:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kevybear](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kevybear/32/25872_2.png) [@kevybear](https://discuss.elastic.co/u/kevybear)
#### Post date: [March 13, 2018, 10:02pm UTC](https://discuss.elastic.co/t/does-delete-by-query-work-with-index-sorting-in-es-6-0/123813/1 "2018-03-13T22:02:19Z")

</div>

Hi,

I am migrating an entity centric index from ES 2.3 to ES 6.0 and in ES 6.0, \_ttl is deprecated. I originally was planning on using rolling indices but it won't work for us well since routing logic is complex for my use case.

So the question here is this: if I am using a single index with DELETE\_BY\_QUERY/force merge operations to handle deleting old documents, will it work with index sorting where I sort by a field **lastUpdateTime** and then delete if **lastUpdateTime** is past a certain time? In particular, will the DELETE\_BY\_QUERY operation come to early termination?

And does anybody have actual benchmarks for searching on rolling indices vs a single index?

Index sorting: [https://www.elastic.co/blog/index-sorting-elasticsearch-6-0](https://www.elastic.co/blog/index-sorting-elasticsearch-6-0)

---

<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: [April 10, 2018, 10:02pm UTC](https://discuss.elastic.co/t/does-delete-by-query-work-with-index-sorting-in-es-6-0/123813/2 "2018-04-10T22:02:25Z")

</div>

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