There's more...

Sometimes, it is required to propagate information of nested objects to their parent or root objects. This is mainly to build simpler queries about the parents (such as terms queries without using nested ones). To achieve this goal, there are two special properties of nested objects that must be used:

  • include_in_parent: This makes it possible to automatically add the nested fields to the immediate parent
  • include_in_root: This adds the nested object fields to the root object

These settings add data redundancy, but they reduce the complexity of some queries, thus improving performance.