# Shall we add more than 50 nested fields in single index?

**URL:** <https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901>\
**Category:** Elasticsearch\
**Created:** [July 20, 2020, 2:11pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901 "2020-07-20T14:11:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [July 20, 2020, 2:11pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/1 "2020-07-20T14:11:30Z")

</div>

Hi Team,  
Greetings..! Hope you are doing good.  
My requirement is to add 55 nested fields in a single index. but elastic recommendation is 50, If i add more than 50 nested fields means will it affect my performance?  
Kindly clarify my doubt.

Thanks in advance.

---

<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:** [July 20, 2020, 2:22pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/2 "2020-07-20T14:22:22Z")

</div>

Having a lot of nested fields can have a significant impact on performance, especially when modifying a document. Why do you need so many? What is the use case?

---

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [July 28, 2020, 1:19pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/3 "2020-07-28T13:19:49Z")

</div>

Sorry Christian Dahlqvist for late reply. In my project i need to store array of values in 52 different fields. That's why i need that much nested fields.

Many more thanks for your hep and suggestions.

---

<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:** [July 28, 2020, 1:37pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/4 "2020-07-28T13:37:39Z")

</div>

How large are the documents? How frequently are they altered or updated?

---

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [July 28, 2020, 1:57pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/5 "2020-07-28T13:57:19Z")

</div>

Document size will be small, but they will update very frequently.

---

<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:** [July 28, 2020, 2:04pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/6 "2020-07-28T14:04:41Z")

</div>

Very frequent updates of documents with large number of nested fields of s something I believe will quickly cause you considerable performance problems. How frequent is frequent? How many documents will you be having?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 28, 2020, 2:40pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/7 "2020-07-28T14:40:55Z")

</div>

> [@gokulnath112](#):
>
> i need to store array of values in 52 different fields. That's why i need that much nested fields.

Just a sanity check - there's no need to store arrays of primitive values as nested.  
Arrays of objects is a different question though.

---

<div class="post-metadata">

**Author:** ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)\
**Post date:** [July 29, 2020, 12:32pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/8 "2020-07-29T12:32:41Z")

</div>

10 to 15 lakhs of documents approx per index. They will update a document at least one time per day.

---

<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:** [August 26, 2020, 12:47pm UTC](https://discuss.elastic.co/t/shall-we-add-more-than-50-nested-fields-in-single-index/241901/9 "2020-08-26T12:47:22Z")

</div>

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