Nested queries and cross referencing

After reading this
excellent document on managing relations in Elasticsearch, I have decided
that 'nested queries' are the best solution for our particular query
needs.Of the list of negatives for nested queries documented in the link
above, 1) using the special nested query 2) having to reindex the entire
document after and update and 3) inability to cross reference between
nested objects, it is this third item that I still find confusing. Would
someone be able to provide a sample document, nested mapping, and query
that will not work due to this issue?

Here is the snippet from the source document for which I would like further

"Lastly, it is not possible to “cross reference” between nested documents.
One nested doc cannot “see” another nested doc’s properties. For example,
you are not able to filter on “” but facet on “B.age”. You can get
around this by using include_in_root, which effectively copies the nested
docs into the root, but this get’s you back to the problems of inner

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

1 Like