"No results found" 在 Django Haystack ElasticSearch 上

"No results found" on Django Haystack ElasticSearch

Failed to query Elasticsearch using '*:*': TransportError(400,u'parsing_exception', u'no [query] registered for [filtered]')
Traceback (most recent call last): File "C:\Python27\lib\site-packages\haystack\backends\elasticsearch_backend.py", line 524, in search
_source=True)
File "C:\Python27\lib\site-packages\elasticsearch\client\utils.py", line 71, in _wrapped
return func(*args, params=params, **kwargs)
File "C:\Python27\lib\site-packages\elasticsearch\client\__init__.py", line 569, in search
doc_type, '_search'), params=params, body=body)
File "C:\Python27\lib\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 "C:\Python27\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 124, in perform_request
self._raise_error(response.status, raw_data)
File "C:\Python27\lib\site-packages\elasticsearch\connection\base.py", line 122, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
RequestError: TransportError(400, u'parsing_exception', u'no [query] registered for [filtered]')

已在 haystack 文档的默认搜索表单上获得 "No results found"。当我尝试在 searchqueryset 上调用 count 时,出现此错误。

尚不支持 Elasticsearch 版本 5 (http://django-haystack.readthedocs.io/en/v2.5.1/installing_search_engines.html#elasticsearch):

Haystack currently only supports ElasticSearch 1.x. ElasticSearch 2.x is not supported yet, if you would like to help, please see #1247.

所以我们只剩下版本 1.x