Django/Haystack error: elasticsearch.exceptions.RequestError: TransportError(400, 'parsing_exception',...)
no [query] registered for [filtered]
From what I can see you are running ES 5.0 and you're sending a filtered
query which has been deprecated in ES 2.x and removed in ES 5.x.
You need to replace it with a bool/filter
query instead.
So if you had something like this:
{ "query": { "filtered": { "filter": {} } }}
Simply replace it with
{ "query": { "bool": { "filter": {} } }}
Elasticsearch already deprecate filtered
query. Use bool
instead.
It works for me.
According to the haystack docs to fix this error you should set correct version of haystack engine backend in settings.For elasticsearch v 5.x.x it will be
H_ENGINE = 'haystack.backends.elasticsearch5_backend.Elasticsearch5SearchEngine'