I have documents in a parent/child relation. In a query run on the parent,
I'd like to know, if the found parents have children matching some query. I
don't want to filter only parents with some conditions on the child, but
only get the information, that they have childrens matching some query.
Any idea if that's possible? I've been thinking maybe adding a scrip_field
that would compute that, but have no idea how to run child queries from a
An example to clarify my problem:
child has a boolean field "error"
I run a query on the parent and want to show an information if any of the
children has the error flag set.
Any hint would be welcome.
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 firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c5bbf2eb-7960-4740-9e0c-a70dbe98a9aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.