join in elastic search
If you can't combine your search term into a single query, you can use dis_max function to create a union of subqueries.
{ "dis_max" : { "tie_breaker" : 0.7, "boost" : 1.2, "queries" : [ { "term" : { "name" : "john" } }, { "term" : { "name" : "mary" } } ] }}