# Rollover creates index with default shards instead of 1st index shard configuration

**URL:** <https://forum.opensearch.org/t/rollover-creates-index-with-default-shards-instead-of-1st-index-shard-configuration/11517>\
**Category:** OpenSearch\
**Tags:** discuss, troubleshoot, configure\
**Created:** [November 16, 2022, 1:42pm UTC](https://forum.opensearch.org/t/rollover-creates-index-with-default-shards-instead-of-1st-index-shard-configuration/11517 "2022-11-16T13:42:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jocheinfa](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jocheinfa](https://forum.opensearch.org/u/jocheinfa)\
**Post date:** [November 16, 2022, 1:42pm UTC](https://forum.opensearch.org/t/rollover-creates-index-with-default-shards-instead-of-1st-index-shard-configuration/11517/1 "2022-11-16T13:42:09Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
OpenSearch 1.3

**Describe the issue** :  
I have an index associated with a rollover policy that has 1 shard and 1 replica. After policy is executed, a new index -000002 is generated, but with 5 shards and 1 replica

**Configuration** :

```auto
{
    "policy": {
        "policy_id": "email-sender-ms_policy",
        "description": "A policy for email sender rollover and delete",
        "last_updated_time": 1668540938405,
        "schema_version": 14,
        "error_notification": null,
        "default_state": "rollover",
        "states": [
            {
                "name": "rollover",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        },
                        "rollover": {
                            "min_size": "100mb"
                        }
                    }
                ],
                "transitions": [
                    {
                        "state_name": "delete",
                        "conditions": {
                            "min_index_age": "7d"
                        }
                    }
                ]
            },
            {
                "name": "delete",
                "actions": [
                    {
                        "retry": {
                            "count": 3,
                            "backoff": "exponential",
                            "delay": "1m"
                        },
                        "delete": {}
                    }
                ],
                "transitions": []
            }
        ],
        "ism_template": [
            {
                "index_patterns": [
                    "email-sender-ms*"
                ],
                "priority": 100,
                "last_updated_time": 1668540938405
            }
        ]
    }
}

```

**Relevant Logs or Screenshots** :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/1/1da3ac5337a4672a23d182028b343ef2de013ead.png)

---

<div class="post-metadata">

**Author:** ![andrejvanderzee](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@andrejvanderzee](https://forum.opensearch.org/u/andrejvanderzee)\
**Post date:** [March 18, 2023, 4:18pm UTC](https://forum.opensearch.org/t/rollover-creates-index-with-default-shards-instead-of-1st-index-shard-configuration/11517/2 "2023-03-18T16:18:13Z")

</div>

Yes I am experiencing the same behavior in AWS Opensearch 2.3.

Is there any solution that the rolled over index takes the number of primary shards is taken from the first index instead of the global default?

---

<div class="post-metadata">

**Author:** ![raviagr](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@raviagr](https://forum.opensearch.org/u/raviagr)\
**Post date:** [October 19, 2023, 6:45pm UTC](https://forum.opensearch.org/t/rollover-creates-index-with-default-shards-instead-of-1st-index-shard-configuration/11517/3 "2023-10-19T18:45:58Z")

</div>

Did you find a solution to this? I’d also like to be able to set settings of the new rolled over index to the same as the original index
