# Filtered Query not working with Elasticsearch 1.3.0

**URL:** https://discuss.elastic.co/t/filtered-query-not-working-with-elasticsearch-1-3-0/19792
**Category:** Elasticsearch
**Created:** [September 15, 2014, 4:03pm UTC](https://discuss.elastic.co/t/filtered-query-not-working-with-elasticsearch-1-3-0/19792 "2014-09-15T16:03:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![roopednra](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@roopednra](https://discuss.elastic.co/u/roopednra)
#### Post date: [September 15, 2014, 4:03pm UTC](https://discuss.elastic.co/t/filtered-query-not-working-with-elasticsearch-1-3-0/19792/1 "2014-09-15T16:03:40Z")

</div>

Filtered query not working with Elasticsearch 1.3.0. I upgrade  
elasticsearch 0.90.5 to 1.3.0.  
I am using elasticsearch Query DSL;

```
{
    "query": {
        "match_all": {},
        "filtered": {
           "filter": {
               "bool": {
                   "must": [
                      {
                          "terms": {
                             "status": [
                                "publish"
                             ]
                          }
                      }
                   ]
               }
           }
        }
    }
}

```

In Elasticsearch 0.90.5 below query DSL is working fine. But in  
Elasticsearch 1.3.0 getting error.

ElasticsearchParseException[Expected field name but got START\_OBJECT

**Complete Error Message:**

```
{

    error: SearchPhaseExecutionException[Failed to execute phase [query

```

], all shards failed; shardFailures {[8FQelETaR22xvV1SvynPEQ][esindex][0]:  
RemoteTransportException[[server1][inet[/127.0.0.1:9300]][search/phase/query  
]]; nested: SearchParseException[[esindex][0]: query[ConstantScore(_:_)],  
from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,"query":{  
"match\_all":{},"filtered":{"filter":{"bool":{"must":[{"terms":{"status":[  
"publish"]}}]}}}}}]]]; nested: ElasticsearchParseException[Expected field  
name but got START\_OBJECT "filtered"]; }{[8FQelETaR22xvV1SvynPEQ][esindex][1  
]: RemoteTransportException[[server1][inet[/127.0.0.1:9300]][search/phase/  
query]]; nested: SearchParseException[[esindex][1]: query[ConstantScore  
(_:_)],from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,  
"query":{"match\_all":{},"filtered":{"filter":{"bool":{"must":[{"terms":{  
"status":["publish"]}}]}}}}}]]]; nested: ElasticsearchParseException[  
Expected field name but got START\_OBJECT "filtered"]; }{[  
hZgYLUmsQL2T8z1MY2eyNA][esindex][2]: SearchParseException[[esindex][2]:  
query[ConstantScore(_:_)],from[-1],size[1]: Parse Failure [Failed to parse  
source [{"size":1,"query":{"match\_all":{},"filtered":{"filter":{"bool":{  
"must":[{"terms":{"status":["publish"]}}]}}}}}]]]; nested:  
ElasticsearchParseException[Expected field name but got START\_OBJECT  
"filtered"]; }]  
status: 400

```
}    

```

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e0e632cb-1f58-417e-b642-eabfd8514942%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e0e632cb-1f58-417e-b642-eabfd8514942%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:02am UTC](https://discuss.elastic.co/t/filtered-query-not-working-with-elasticsearch-1-3-0/19792/2 "2017-07-06T01:02:16Z")

</div>


