# Alias applogs-team1 has more than one write index \[ applogs-team1-000001 , applogs-team1-000002\]

**URL:** <https://discuss.elastic.co/t/alias-applogs-team1-has-more-than-one-write-index-applogs-team1-000001-applogs-team1-000002/299737>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [March 15, 2022, 1:22pm UTC](https://discuss.elastic.co/t/alias-applogs-team1-has-more-than-one-write-index-applogs-team1-000001-applogs-team1-000002/299737 "2022-03-15T13:22:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam7](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sam7](https://discuss.elastic.co/u/sam7)\
**Post date:** [March 15, 2022, 1:22pm UTC](https://discuss.elastic.co/t/alias-applogs-team1-has-more-than-one-write-index-applogs-team1-000001-applogs-team1-000002/299737/1 "2022-03-15T13:22:19Z")

</div>

I have created Index pattern,ILM Policies(HOT and Warm tier), templates and aliases using the following settings.

```auto
PUT _index_template/applogs_template
{
"index_patterns": ["applogs-team1-*"],
"template": {
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.lifecycle.name": "applog-custom-policy",
"index.lifecycle.rollover_alias": "applogs-team1"
}
}
}

```

```auto
POST _aliases
{
"actions": [
{
"add": {
"index": "applogs-team1-*",
"alias": "applogs-team1",
"is_write_index": true
}
}
]
}

```

After ILM rollover of index applogs-team1-000001 it is creating applogs-team1-000002 index. But writing the documents to old index(applogs-team1-000001).

Because write is pointing to old. As per my understanding write head should auto moved to new index i.e. applogs-team1-000002 once created.

Please let me know where I am missing.

---

<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 12, 2022, 1:23pm UTC](https://discuss.elastic.co/t/alias-applogs-team1-has-more-than-one-write-index-applogs-team1-000001-applogs-team1-000002/299737/2 "2022-04-12T13:23:05Z")

</div>

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