I'm from Py3 and es6.7 in my macOS. When I try to search and it raise an error.
body = {
"query": {"match": {"doc.name": s_key}},
"filter": {"term": {"doc.is_vaild": True}}
}
print(es.search(index='crm_brand', doc_type='_doc', body=body))
Error:
elasticsearch.exceptions.RequestError: RequestError(400, 'parsing_exception', 'Unknown key for a START_OBJECT in [filter].')