Elasticsearch : Term query returns everything
<p>I am trying to execute a term query as</p>

<pre><code>get indexName/test/_search
{
  "query": {
  "term": {
      "stat": "REVIEW" 
    }
  }
}
</code></pre>

<p>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</p>

<pre><code>    print qry
    result =  es.search(index=indexName, body=qry)

    total = result['hits'] ['total']
    print "Got "+str(total)
</code></pre>

<p>i get </p>

<pre><code>{'query': {'term': {'stat': 'REVIEW'}}, 'from': 0}
Got 0
</code></pre>

<p>how is this possible? Is there something wrong with my syntax?</p>