-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Description
Hi,
i have the following (sample) query:
{
"query": {
"filtered": {
"query": {
"match_all": {
}
},
"filter": {
"bool": {
"must": {
"term": {
"user": {
"value": "kimchy"
}
}
},
"must_not": {
"range": {
"age": {
"from": 10,
"to": 20
}
}
},
"should": [
{
"term": {
"tag": {
"value": "wow"
}
}
},
{
"term": {
"tag": {
"value": "elasticsearch"
}
}
}
]
}
}
}
}
}
When I run it against Elasticsearch 0.19.1, I get the following message:
$ curl -XPOST localhost:9200/test
$ curl -XPOST localhost:9200/_all/_search -d @query.json
... long output
nested: QueryParsingException[[test] [filtered] query does not support [should]]; }]","status":500}
When I change the term queries to their simpler form, it works:
{
"query": {
"filtered": {
"query": {
"match_all": {
}
},
"filter": {
"bool": {
"must": {
"term": {
"user": "kimchy"
}
},
"must_not": {
"range": {
"age": {
"from": 10,
"to": 20
}
}
},
"should": [
{
"term": {
"tag": "wow"
}
},
{
"term": {
"tag": "elasticsearch"
}
}
]
}
}
}
}
}
Both forms work against 0.18.7.
Metadata
Metadata
Assignees
Labels
No labels