在Haystack update_index期间:'结果窗口太大,+大小必须小于或等于:[10000]但是[10100]

时间:2018-02-15 05:55:28

标签: elasticsearch django-haystack

我有django-haystack 2.6.1和Elasticsearch 2.4.6。我有一个大约200k文档的索引,在update_index期间有8个工作人员,批量大小为100,我收到以下错误:

Failed to query Elasticsearch using '*:*': TransportError(500, u'search_phase_execution_exception', u'Result window is too large, from + size must be less than or equal to: [10000] but was [10100]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter.') Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/haystack/backends/elasticsearch_backend.py", line 524, in search _source=True) File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/utils.py", line 73, in _wrapped return func(*args, params=params, **kwargs) File "/usr/local/lib/python2.7/dist-packages/elasticsearch/client/__init__.py", line 623, in search doc_type, '_search'), params=params, body=body) File "/usr/local/lib/python2.7/dist-packages/elasticsearch/transport.py", line 312, in perform_request status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout) File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/http_urllib3.py", line 128, in perform_request self._raise_error(response.status, raw_data) File "/usr/local/lib/python2.7/dist-packages/elasticsearch/connection/base.py", line 125, in _raise_error raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info) TransportError: TransportError(500, u'search_phase_execution_exception', u'Result window is too large, from + size must be less than or equal to: [10000] but was [10100]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level parameter.')

我认为我不想简单地让结果窗口更大,因为它只是在欺骗问题。听起来像Haystack正在result_window + my_batch_size查询,所以这并非巧合。

这是一个已知问题吗?知道怎么解决吗?

我的命令是:

./manage.py update_index --remove -k 8 --batch-size=100

感谢。

0 个答案:

没有答案