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文档的默认搜索表单中获取“未找到结果”。当我尝试在searchqueryset上调用count时,我收到此错误。
答案 0 :(得分:1)
尚不支持Elasticsearch版本5(http://django-haystack.readthedocs.io/en/v2.5.1/installing_search_engines.html#elasticsearch):
干草堆目前只有 支持ElasticSearch 1.x.如果是,则不支持ElasticSearch 2.x. 你想帮忙,请看 #1247
所以我们只剩下版本1.x