# How to create auto rollover index names without "-\\\\d+$" pattern at the end?

**URL:** <https://discuss.elastic.co/t/how-to-create-auto-rollover-index-names-without-d-pattern-at-the-end/308284>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [June 27, 2022, 6:04pm UTC](https://discuss.elastic.co/t/how-to-create-auto-rollover-index-names-without-d-pattern-at-the-end/308284 "2022-06-27T18:04:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas708](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@thomas708](https://discuss.elastic.co/u/thomas708)\
**Post date:** [June 27, 2022, 6:04pm UTC](https://discuss.elastic.co/t/how-to-create-auto-rollover-index-names-without-d-pattern-at-the-end/308284/1 "2022-06-27T18:04:34Z")

</div>

I'm using ILM to create daily auto rollover indices with dates in the index names. If bootstrap the initial index with following then it works. The next index auto created will be "test-2022.06.17-000002", then "test-2022.06.18-000003", etc.

```auto
// <test-{now/d}-000001>
PUT /%3Ctest-%7Bnow%2Fd%7D-000001%3E 
{
  "aliases": {
    "test": {
      "is_write_index": true
    }
  }
}

```

But if I leave out the "-000001" in the initial index, like just "test-{now/d}", then ILM fails to auto create the next index, and I got error

```auto
index name [<test-{now/d}>] does not match pattern '^.*-\\d+$'

```

Is there any way to have daily auto index rollover with just dates in them, like "test-2022.06.16", "test-2022.06.17", "test-2022.06.18", etc?

---

<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:** [June 27, 2022, 6:10pm UTC](https://discuss.elastic.co/t/how-to-create-auto-rollover-index-names-without-d-pattern-at-the-end/308284/2 "2022-06-27T18:10:54Z")

</div>

No, that is not possible. If you roll over based on a combination of size and age you can end up with multiple indices per day, and the naming convention you specified does not support that. This is why rollover always have a incrementing number at the end. If you strictly want an index per day, do not use rollover and instead set the index name in e.g. Logstash.

---

<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 25, 2022, 6:11pm UTC](https://discuss.elastic.co/t/how-to-create-auto-rollover-index-names-without-d-pattern-at-the-end/308284/3 "2022-07-25T18:11:21Z")

</div>

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