elastic search join query
You've said you want to retrieve the parent document based on child's field but your query does the opposite. You want has_child
:
{ "query": { "has_child" : { "type" : "<child_type>", "query" : { "term" : { "name" : "child_name" } } } }}