# Will a field with nested type holding array of single object be indexed as separate document by ES

**URL:** <https://discuss.elastic.co/t/will-a-field-with-nested-type-holding-array-of-single-object-be-indexed-as-separate-document-by-es/179760>\
**Category:** Elasticsearch\
**Created:** [May 6, 2019, 11:52am UTC](https://discuss.elastic.co/t/will-a-field-with-nested-type-holding-array-of-single-object-be-indexed-as-separate-document-by-es/179760 "2019-05-06T11:52:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ram\_Prasath](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ram_prasath/32/45614_2.png) [@Ram\_Prasath](https://discuss.elastic.co/u/Ram_Prasath)\
**Post date:** [May 6, 2019, 11:52am UTC](https://discuss.elastic.co/t/will-a-field-with-nested-type-holding-array-of-single-object-be-indexed-as-separate-document-by-es/179760/1 "2019-05-06T11:52:08Z")

</div>

The field with nested type will be indexed be indexed as a separate document and creates a relationship with the parent document internally.

My question is that if the nested filed has a array of single object instead of multiple object how does es indexes this data? will this also be indexed as a separate document or will it be indexed as the inner object of the parent document.

---

<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:** [May 6, 2019, 12:01pm UTC](https://discuss.elastic.co/t/will-a-field-with-nested-type-holding-array-of-single-object-be-indexed-as-separate-document-by-es/179760/2 "2019-05-06T12:01:30Z")

</div>

Each object in the array will behind the scenes be indexed as a separate object no matter the size of the array.

---

<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:** [June 3, 2019, 12:01pm UTC](https://discuss.elastic.co/t/will-a-field-with-nested-type-holding-array-of-single-object-be-indexed-as-separate-document-by-es/179760/3 "2019-06-03T12:01:36Z")

</div>

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