# Rollover API not incrementing time based indices

**URL:** https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458
**Category:** Elasticsearch
**Created:** [May 19, 2017, 3:43pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458 "2017-05-19T15:43:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![danwhitacre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danwhitacre/32/31574_2.png) [@danwhitacre](https://discuss.elastic.co/u/danwhitacre)
#### Post date: [May 19, 2017, 3:43pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458/1 "2017-05-19T15:43:36Z")

</div>

Hey all. I am on ES 5.1.1 and I am trying to use the \_rollover api. I have an index `test-2017.05.18-1` with an alias `test-w`. When calling the rollover api with `max_age` 0d, my new index associated with the `test-w` alias is `test-2017.05.18-000002`. The doc here ([https://www.elastic.co/guide/en/elasticsearch/reference/5.1/indices-rollover-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/indices-rollover-index.html)) seems to indicate that date math should be applied as well, to create an index `test-2017.05.19-000002`, but that doesn't seem to be the case.

Am I misunderstanding the doc, or am I doing something incorrectly?

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [May 19, 2017, 4:19pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458/2 "2017-05-19T16:19:14Z")

</div>

The end number will increment, not the date part.

---

<div class="post-metadata">

### Author: ![danwhitacre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danwhitacre/32/31574_2.png) [@danwhitacre](https://discuss.elastic.co/u/danwhitacre)
#### Post date: [May 19, 2017, 4:54pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458/3 "2017-05-19T16:54:49Z")

</div>

In the docs its says this though -\> "Rolls over to a new index with today’s date, e.g. logs-2016.10.31-000002 if run immediately, or logs-2016.11.01-000002 if run after 24 hours"

---

<div class="post-metadata">

### Author: ![danwhitacre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danwhitacre/32/31574_2.png) [@danwhitacre](https://discuss.elastic.co/u/danwhitacre)
#### Post date: [May 19, 2017, 5:03pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458/4 "2017-05-19T17:03:20Z")

</div>

@theuntergeek So are the docs wrong? Or is this a bug?

---

<div class="post-metadata">

### Author: ![danwhitacre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danwhitacre/32/31574_2.png) [@danwhitacre](https://discuss.elastic.co/u/danwhitacre)
#### Post date: [May 19, 2017, 5:30pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458/5 "2017-05-19T17:30:44Z")

</div>

Opened an issue: [https://github.com/elastic/elasticsearch/issues/24803](https://github.com/elastic/elasticsearch/issues/24803)

---

<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: [June 16, 2017, 5:31pm UTC](https://discuss.elastic.co/t/rollover-api-not-incrementing-time-based-indices/86458/6 "2017-06-16T17:31:34Z")

</div>

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