# How to change Index.mapping.depth.limit

**URL:** <https://discuss.elastic.co/t/how-to-change-index-mapping-depth-limit/204233>\
**Category:** Elasticsearch\
**Created:** [October 18, 2019, 1:32pm UTC](https://discuss.elastic.co/t/how-to-change-index-mapping-depth-limit/204233 "2019-10-18T13:32:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![planetracer](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@planetracer](https://discuss.elastic.co/u/planetracer)\
**Post date:** [October 18, 2019, 1:32pm UTC](https://discuss.elastic.co/t/how-to-change-index-mapping-depth-limit/204233/1 "2019-10-18T13:32:53Z")

</div>

How would you set the index.mapping.depth.limit field? I have been getting this error:

"status" : 400,  
"error" : {  
"type" : "illegal\_argument\_exception",  
"reason" : "Limit of mapping depth [20] in index [durations2] has been exceeded due to object field [metadata.pkg-value-esk. ( cd .............]"

---

<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:** [October 19, 2019, 8:16am UTC](https://discuss.elastic.co/t/how-to-change-index-mapping-depth-limit/204233/2 "2019-10-19T08:16:16Z")

</div>

What kind of data do you have that causes you to run into this? How do you query something with that level of nesting? What is the use case?

---

<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:** [November 16, 2019, 8:16am UTC](https://discuss.elastic.co/t/how-to-change-index-mapping-depth-limit/204233/3 "2019-11-16T08:16:16Z")

</div>

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