Child Doc Count as Filter

I have a general question.. Say I have records in a parent/child type
relationship where doc X is a Parent of Doc Y which and for each Y there
are N number of documents...

What would be the best way to get all X documents where the number of Y
documents is greater than Z?

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/98a9bdad-bf19-463f-a858-5ff5ca63171f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.