当我尝试python manage.py rebuild_index时,出现错误:
self.conn.bulk_index(self.index_name, 'modelresult', prepped_docs, id_field=ID)
AttributeError: 'ElasticSearch' object has no attribute 'bulk_index'我找到了https://github.com/toastdriven/pyelasticsearch/blob/master/pyelasticsearch.py#L424-469和pyelasticsearch.py的链接,但我不知道是哪个版本。无论如何,在代码中有bulk_index,买我的pyelasticsearch.py不是。有没有人有过同样的经历?感谢您的宝贵时间。
加上: django-haystack 2.0.0.beta,pyelasticsearch 0.0.6
发布于 2012-08-15 20:43:31
Django-haystack将不能与原始pyelasticsearch搜索一起工作。你需要改用toastdriven的fork:https://github.com/toastdriven/pyelasticsearch如果你使用pip,只需输入:
pip uninstall pyelasticsearch
pip install git+git://github.com/toastdriven/pyelasticsearch.githttps://stackoverflow.com/questions/11963513
复制相似问题