# Several filter in query : \[filtered\] query does not support \[filter\]

**URL:** <https://discuss.elastic.co/t/several-filter-in-query-filtered-query-does-not-support-filter/15052>\
**Category:** Elasticsearch\
**Created:** [December 30, 2013, 12:30pm UTC](https://discuss.elastic.co/t/several-filter-in-query-filtered-query-does-not-support-filter/15052 "2013-12-30T12:30:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moh](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@Moh](https://discuss.elastic.co/u/Moh)\
**Post date:** [December 30, 2013, 12:30pm UTC](https://discuss.elastic.co/t/several-filter-in-query-filtered-query-does-not-support-filter/15052/1 "2013-12-30T12:30:35Z")

</div>

Hi,

I want to use several filters in my query.

I follow official documentation  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-and-filter.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-and-filter.html)

But it does not work.

Saisissez le code ici...{  
"error": "SearchPhaseExecutionException[Failed to execute phase  
[query], all shards failed; shardFailures  
{[FD4W1oSYQPG1MHRySK\_RPQ][shops][4]: SearchParseException[[shop][4]:  
from[-1],size[-1]: Parse Failure [Failed to parse source [ ..... ; nested:  
QueryParsingException[[shops] [filtered] query does not support [filter]];  
}]",  
"status": 400  
}

And the query :

{  
"query": {  
"match\_all": {}  
},  
"filter": {  
"and": [  
{  
"geo\_distance": {  
"distance": "500m",  
"location": {  
"lat": 45.9402896,  
"lon": 4.7779216  
}  
}  
},  
{  
"numeric\_range": {  
"rate": {  
"gte": 3  
}  
}  
}  
],  
"\_cache": true  
},  
"sort": [  
{  
"\_geo\_distance": {  
"order": "asc",  
"unit": "m",  
"location": {  
"lat": 45.9402896,  
"lon": 4.7779216  
}  
}  
}  
]  
}

What is wrong with this query ?

Regards

--  
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/54da5513-b6a9-4a3a-b704-a07d52c2bd43%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/54da5513-b6a9-4a3a-b704-a07d52c2bd43%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 1, 2014, 8:09pm UTC](https://discuss.elastic.co/t/several-filter-in-query-filtered-query-does-not-support-filter/15052/2 "2014-01-01T20:09:44Z")

</div>

Hey,

the query looks ok from a birds eye view. Can you say, which elasticsearch  
version you are using? Did you try with the 0.90.9?  
However the mapping and and indexed data is also important. Can you create  
a gist, so one can recreate the issue locally - I guess it is reproducible,  
right? That would be great!

--Alex

On Mon, Dec 30, 2013 at 1:30 PM, Moh [matarmario@gmail.com](mailto:matarmario@gmail.com) wrote:

> Hi,
> 
> I want to use several filters in my query.
> 
> I follow official documentation  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-and-filter.html)
> 
> But it does not work.
> 
> Saisissez le code ici...{  
> "error": "SearchPhaseExecutionException[Failed to execute phase  
> [query], all shards failed; shardFailures  
> {[FD4W1oSYQPG1MHRySK\_RPQ][shops][4]: SearchParseException[[shop][4]:  
> from[-1],size[-1]: Parse Failure [Failed to parse source [ ..... ; nested:  
> QueryParsingException[[shops] [filtered] query does not support [filter]];  
> }]",  
> "status": 400  
> }
> 
> And the query :
> 
> {  
> "query": {  
> "match\_all": {}  
> },  
> "filter": {  
> "and": [  
> {  
> "geo\_distance": {  
> "distance": "500m",  
> "location": {  
> "lat": 45.9402896,  
> "lon": 4.7779216  
> }  
> }  
> },  
> {  
> "numeric\_range": {  
> "rate": {  
> "gte": 3  
> }  
> }  
> }  
> ],  
> "\_cache": true  
> },  
> "sort": [  
> {  
> "\_geo\_distance": {  
> "order": "asc",  
> "unit": "m",  
> "location": {  
> "lat": 45.9402896,  
> "lon": 4.7779216  
> }  
> }  
> }  
> ]  
> }
> 
> What is wrong with this query ?
> 
> Regards
> 
> --  
> 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/54da5513-b6a9-4a3a-b704-a07d52c2bd43%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/54da5513-b6a9-4a3a-b704-a07d52c2bd43%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAGCwEM\_noYEsstuvfSk7VbTuYBVLyPxp5qOBwOxJT\_XZtp4V%2BQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_noYEsstuvfSk7VbTuYBVLyPxp5qOBwOxJT_XZtp4V%2BQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:58am UTC](https://discuss.elastic.co/t/several-filter-in-query-filtered-query-does-not-support-filter/15052/3 "2017-07-06T01:58:46Z")

</div>


