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


(Moh) #1

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

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.
To view this discussion on the web visit 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.


(Alexander Reelsen) #2

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 wrote:

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

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.
To view this discussion on the web visit
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.

--
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.
To view this discussion on the web visit 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.


(system) #3