I followed tutorial on: http://krzysztofzuraw.com/blog/2016/haystack-elasticsearch-part-two.html http://www.techstricks.com/django-haystack-and-elasticsearch-tutorial/
Everything works fine but when i try to query something from the search box it shows no result found and in the console this error appears.
INFO base GET http://127.0.0.1:9200/haystack/_mapping [status:200 request:0.015s]
INFO base PUT http://127.0.0.1:9200/haystack [status:400 request:0.018s]
INFO base PUT http://127.0.0.1:9200/haystack/_mapping/modelresult [status:200 request:0.023s]
WARNING base GET http://127.0.0.1:9200/haystack/modelresult/_search?_source=true [status:400 request:0.005s]
Failed to query Elasticsearch using '(a)': TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
Traceback (most recent call last):
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/haystack/backends/elasticsearch_backend.py", line 524, in search
_source=True)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 71, in _wrapped
return func(*args, params=params, **kwargs)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/__init__.py", line 569, in search
doc_type, '_search'), params=params, body=body)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/transport.py", line 327, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 124, in perform_request
self._raise_error(response.status, raw_data)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 122, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
ERROR elasticsearch_backend Failed to query Elasticsearch using '(a)': TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
Traceback (most recent call last):
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/haystack/backends/elasticsearch_backend.py", line 524, in search
_source=True)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 71, in _wrapped
return func(*args, params=params, **kwargs)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/__init__.py", line 569, in search
doc_type, '_search'), params=params, body=body)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/transport.py", line 327, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 124, in perform_request
self._raise_error(response.status, raw_data)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 122, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
WARNING base GET http://127.0.0.1:9200/haystack/modelresult/_search?_source=true [status:400 request:0.003s]
Failed to query Elasticsearch using '(a)': TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
Traceback (most recent call last):
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/haystack/backends/elasticsearch_backend.py", line 524, in search
_source=True)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 71, in _wrapped
return func(*args, params=params, **kwargs)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/__init__.py", line 569, in search
doc_type, '_search'), params=params, body=body)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/transport.py", line 327, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 124, in perform_request
self._raise_error(response.status, raw_data)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 122, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
ERROR elasticsearch_backend Failed to query Elasticsearch using '(a)': TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
Traceback (most recent call last):
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/haystack/backends/elasticsearch_backend.py", line 524, in search
_source=True)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/utils.py", line 71, in _wrapped
return func(*args, params=params, **kwargs)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/client/__init__.py", line 569, in search
doc_type, '_search'), params=params, body=body)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/transport.py", line 327, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py", line 124, in perform_request
self._raise_error(response.status, raw_data)
File "/home/alamin/.virtualenvs/msnb2/lib/python3.5/site-packages/elasticsearch/connection/base.py", line 122, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, 'parsing_exception', 'no [query] registered for [filtered]')
[29/Oct/2016 10:10:28]"GET /search/?q=a HTTP/1.1" 200 22675
I set up elasticsearch 2.3.1 instead of 5 and it's worked! I think the answer is:
We don't support 5.0 yet, but I'll try to get ahead of it
from github
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With