# Nested Field vs Multiple Indices

**URL:** <https://discuss.elastic.co/t/nested-field-vs-multiple-indices/232500>\
**Category:** Elasticsearch\
**Created:** [May 13, 2020, 7:11pm UTC](https://discuss.elastic.co/t/nested-field-vs-multiple-indices/232500 "2020-05-13T19:11:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Boppana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_boppana/32/67648_2.png) [@Krishna\_Boppana](https://discuss.elastic.co/u/Krishna_Boppana)\
**Post date:** [May 13, 2020, 7:11pm UTC](https://discuss.elastic.co/t/nested-field-vs-multiple-indices/232500/1 "2020-05-13T19:11:01Z")

</div>

Hello - I am new to elastic search. I am trying to figure out the pros and cons of using nested values for a field vs using multiple indexes.

A simple use case is a person has multiple addresses. There are two types of queries will be used: 1. By a person (id, name, etc) 2. By Address (city, state, zip). In both cases, the results needed are the person(s) and addresses associated with persons.

For these use cases, what are the pros and cons of using the Nested field for address vs a separate address index?

Any insights and links to read, of great help. 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:** [May 13, 2020, 7:29pm UTC](https://discuss.elastic.co/t/nested-field-vs-multiple-indices/232500/2 "2020-05-13T19:29:48Z")

</div>

The third option is to denormalize and index person address documents that contain all the information about a person as well as an address. This duplicates person data but is a very common way to efficiently search for data.

---

<div class="post-metadata">

**Author:** ![Krishna\_Boppana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_boppana/32/67648_2.png) [@Krishna\_Boppana](https://discuss.elastic.co/u/Krishna_Boppana)\
**Post date:** [May 13, 2020, 7:40pm UTC](https://discuss.elastic.co/t/nested-field-vs-multiple-indices/232500/3 "2020-05-13T19:40:51Z")

</div>

Thanks, Christian. That was my first approach. However, the explosion of size of the index made me look for other options. As an example, 6 Million x 10 documents. it is coming down to Size, Performance, Cost and Maintenance. I am assuming nested fields will get complicated.

---

<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 10, 2020, 7:40pm UTC](https://discuss.elastic.co/t/nested-field-vs-multiple-indices/232500/4 "2020-06-10T19:40:54Z")

</div>

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