I am trying to execute a term query as
get indexName/test/_search
{
"query": {
"term": {
"stat": "REVIEW"
}
}
}
but it returns everything i.e. all the records. Plus when i try to execute the same query in python using the elasticsearch api as
print qry
result = es.search(index=indexName, body=qry)
total = result['hits'] ['total']
print "Got "+str(total)
i get
{'query': {'term': {'stat': 'REVIEW'}}, 'from': 0}
Got 0
how is this possible? Is there something wrong with my syntax?