0
我有問題讓CircleCI完成使用彈性搜索測試我的Django項目。CircleCI彈性搜索Haystack
這裏是settings.py
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
'INDEX_NAME': 'index_elasticsearch',
},
}
HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor'
的使出下面是從CircleCI報告上的錯誤。它幾乎在每個與數據庫的交互中都顯示出來。
File "/home/ubuntu/virtualenvs/venv-system/local/lib/python2.7/site-packages/elasticsearch/helpers/__init__.py", line 155, in streaming_bulk
raise BulkIndexError('%i document(s) failed to index.' % len(errors), errors)
BulkIndexError: ('1 document(s) failed to index.', [{u'index': {u'_type': u'modelresult', u'_id': u'website.query.1', u'ok': True, u'_version': 19, u'_index': u'index_elasticsearch'}}])
下面是配置CircleCI測試我circle.yml文件:眼下
machine:
environment:
DATABASE_URL: mysql://ubuntu:@localhost:3306/circle_test
CUSTOM_DATABASE_URL: mysql://ubuntu:@localhost:3306/circle_test
services:
- elasticsearch
我最近遇到了Circle的ES版本與正在部署的Haystack版本不兼容的問題。我建議使用他們的文檔來定製安裝在開發/生產中使用的任何版本,而不是使用他們的內置ES版本。 – element119