Nested Field vs Multiple Indices

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.

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.

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.

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