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]')
干草堆文档中的默认搜索表单上已显示“未找到结果”。当我尝试在searchqueryset上调用count时,出现此错误。
回答:
尚不支持Elasticsearch版本5(http://django-
haystack.readthedocs.io/en/v2.5.1/installing_search_engines.html#elasticsearch):
Haystack当前仅支持ElasticSearch1.x。目前尚不支持ElasticSearch 2.x,如果您想提供帮助,请参阅
#1247。
因此,我们只剩下版本1.x
以上是 Django Haystack ElasticSearch上的“未找到结果” 的全部内容, 来源链接: utcz.com/qa/411140.html