# Index.mapping.depth.limit not persistent after an index rollover

**URL:** <https://discuss.elastic.co/t/index-mapping-depth-limit-not-persistent-after-an-index-rollover/327182>\
**Category:** Elasticsearch\
**Created:** [March 7, 2023, 1:57pm UTC](https://discuss.elastic.co/t/index-mapping-depth-limit-not-persistent-after-an-index-rollover/327182 "2023-03-07T13:57:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khaled\_Saidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_saidi/32/98636_2.png) [@Khaled\_Saidi](https://discuss.elastic.co/u/Khaled_Saidi)\
**Post date:** [March 7, 2023, 1:57pm UTC](https://discuss.elastic.co/t/index-mapping-depth-limit-not-persistent-after-an-index-rollover/327182/1 "2023-03-07T13:57:33Z")

</div>

Hi everyone,

I notice that when the current index is rollovered, the **index.mapping.depth.limit** is not take into account for the new created index.  
We are running an elasticsearch cluster and after we have created the first index, we make an elastic api call : **PUT \_all/\_settings?preserve\_existing=true** with this body :

```auto
{  
	"index.mapping.depth.limit" : "100"
}

```

By making this API call : **GET /my-index-\*/\_settings** , we have this result :

```auto
 "my-index-1": {
        "settings": {
            "index": {
                "mapping": {
                    "depth": {
                        "limit": "100"
                    }
                }
                .....
}

```

But when the index is rollovered, the API call response is without the mapping depth limit section, and some errors like **Limit of mapping depth [20] has been exceeded due to object field**

Is there something we are doing it wrong ?

Thanks for your help  
Khaled

---

<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:** [March 7, 2023, 10:19pm UTC](https://discuss.elastic.co/t/index-mapping-depth-limit-not-persistent-after-an-index-rollover/327182/2 "2023-03-07T22:19:37Z")

</div>

You need to put this into your template so that the new index is created using that, so take a look at that 🙂

---

<div class="post-metadata">

**Author:** ![Khaled\_Saidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_saidi/32/98636_2.png) [@Khaled\_Saidi](https://discuss.elastic.co/u/Khaled_Saidi)\
**Post date:** [March 8, 2023, 8:58am UTC](https://discuss.elastic.co/t/index-mapping-depth-limit-not-persistent-after-an-index-rollover/327182/3 "2023-03-08T08:58:52Z")

</div>

> [@Khaled\_Saidi](#):
>
> index.mapping.depth.limit

Hi Mark,  
indeed, it was the correction to implement.  
Thx for your help.

BR,  
Khaled

---

<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 5, 2023, 8:59am UTC](https://discuss.elastic.co/t/index-mapping-depth-limit-not-persistent-after-an-index-rollover/327182/4 "2023-04-05T08:59:46Z")

</div>

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