steveLuo
(Steve Luio)
November 22, 2017, 3:48pm
1
I got the error
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "no [query] registered for [filtered]",
"line": 3,
"col": 17
}
],
"type": "parsing_exception",
"reason": "no [query] registered for [filtered]",
"line": 3,
"col": 17
},
"status": 400
}
when I ran the example
GET /my_index/blogpost/_search
{
"query": {
"filtered": {
"filter": {
"term": { "user": 1 }
}
}
}
}
from
https://www.elastic.co/guide/en/elasticsearch/guide/current/application-joins.html
what am i missing?
Thanks,
Steve
Looks like the documentation is bit outdated,
I got the same error as you did, but the following query works,
curl -XGET 'localhost:9200/my_index/blogpost/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"bool": {
"filter": {
"term": {
"user": 1
}
}
}
}
}
'
Basically wrapped the filter
query in bool
query.
dadoonet
(David Pilato)
November 22, 2017, 4:20pm
3
The user guide has not been updated to 5.x and 6.x yet.
The reference guide is up to date.
system
(system)
Closed
December 20, 2017, 4:20pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.