# Timeseries data with ILM and out of sequence write/delete of older data

**URL:** https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [September 1, 2022, 3:56pm UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459 "2022-09-01T15:56:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kk123](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kk123](https://discuss.elastic.co/u/kk123)
#### Post date: [September 1, 2022, 3:56pm UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459/1 "2022-09-01T15:56:11Z")

</div>

Hi, this question is a follow on from a [Previous post](https://discuss.elastic.co/t/should-i-merge-my-many-indices-into-1-and-use-ilm/313421).

I am looking to merge many indices into 1 and using ILM to manage index size etc. However what happens if I have to update or delete a document in an index that is no longer the hot index? Can I keep all indices as hot, but still use ILM to keep their sizes reasonable?

I have time based data that gets uploaded in blocks. Sometime blocks are missed/lost or fail to upload and get recovered days/weeks later. In this case I need to go insert the data. Presumably data insertion is not a problem, even if out of sequence as it will just write to the current index? Or does it try keep the index sorted based on the indexed fields?

But what happened if I need to up/delete data that has already been moved to another index. The only way I think I can do that is to keep the indices hot?

What am I missing, is there a better way of managing this? The reason I am wanting to merge the indices into 1 is because I have far too many (1800+). So as discussed in the "Previous post" I should move these to a single index and use ILM...

Thanks, your thoughts are appreciated.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 6, 2022, 1:24am UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459/2 "2022-09-06T01:24:47Z")

</div>

> [@kk123](#):
>
> However what happens if I have to update or delete a document in an index that is no longer the hot index?

You need to find the index that the document lives in and update it there, not via the alias.

> [@kk123](#):
>
> Presumably data insertion is not a problem, even if out of sequence as it will just write to the current index?

The only limitation I can think of would be that the data may be deleted after your logical retention period, as it will be older than the actual index age.

---

<div class="post-metadata">

### Author: ![kk123](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kk123](https://discuss.elastic.co/u/kk123)
#### Post date: [September 6, 2022, 6:58am UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459/3 "2022-09-06T06:58:39Z")

</div>

Hi Mark, thank you for the reply. If I only set a hot phase in the ILM with roll over. Would that allow me to update documents via the alias? Or is the problem that an older index is no longer the write index and therefore I can't update/delete through the alias?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [September 6, 2022, 7:12am UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459/4 "2022-09-06T07:12:10Z")

</div>

An alias can only be used to update or delete documents if it is only backed by a single index. You can not update against an alias that point to multiple indices.

---

<div class="post-metadata">

### Author: ![kk123](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kk123](https://discuss.elastic.co/u/kk123)
#### Post date: [September 6, 2022, 9:06am UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459/5 "2022-09-06T09:06:19Z")

</div>

OK thanks....

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 4, 2022, 9:07am UTC](https://discuss.elastic.co/t/timeseries-data-with-ilm-and-out-of-sequence-write-delete-of-older-data/313459/6 "2022-10-04T09:07:18Z")

</div>

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