I'm trying to match on more than one field when querying an ES server via the Python API. But can't figure out the syntax within Python:
I've tried;
res = es.search(index="pyats", doc_type="router_show", body={"query": {"match": {"name": "mark"} AND {"age": "21"}}}, size=1000)
and
res = es.search(index="pyats", doc_type="router_show", body={"query": {"match_all": {"name": "mark"} AND {"age": "21"}}}, size=1000)
and
res = es.search(index="pyats", doc_type="router_show", body={"query": {"match": {"name": "mark"}}, {"match": {"age": "21"}}}, size=1000)
Any advice would be greatly appreciated. None, seem to be working.