Query with match by multiple fields
You need two match
queries enclosed in a bool/must
query, like this:
{ "query": { "bool": { "must": [ { "match": { "name": "n" } }, { "match": { "tag": "t" } } ] } }}