A nested aggregation can access only the fields within the nested document.
It can’t see fields in the root document or in a different nested document.
However, we can step out of the nested scope back into the parent with a
reverse_nested aggregation.

For instance, we can find out which tags our commenters are interested in,
based on the age of the commenter. The comment.age is a nested field, while
the tags are in the root document:

Nested objects are useful when there is one main entity, like our blogpost,
with a limited number of closely related but less important entities, such as
comments. It is useful to be able to find blog posts based on the content of
the comments, and the nested query and filter provide for fast query-time
joins.

The disadvantages of the nested model are as follows:

To add, change, or delete a nested document, the whole document must be
reindexed. This becomes more costly the more nested documents there are.

Search requests return the whole document, not just the matching nested
documents. Although there are plans afoot to support returning the best
-matching nested documents with the root document, this is not yet supported.

Sometimes you need a complete separation between the main document and its
associated entities. This separation is provided by the parent-child
relationship.