【问题标题】:django, haystack, and pyelasticsearch best versionsdjango、haystack 和 pyelasticsearch 最佳版本
【发布时间】:2014-03-14 03:59:54
【问题描述】:

基本上,我在使用这些库时遇到了不合理的错误:

django==1.4.3
pyelasticsearch==0.6
simplejson==3.3.0
django-haystack==2.1.0

我得到的错误是:

  • 来自 python2.7/site-packages/haystack/query.py:
    index_queryset() got an unexpected keyword argument 'using'
    我只是删除它,它可以在本地运行
  • /srv/www/projects/k-state-union/lib/haystack/backends/elasticsearch_backend.py:
    raise MissingDependency("The 'elasticsearch' backend requires the installation of 'pyelasticsearch'. Please refer to the documentation.")
    当pyelasticsearch导入失败时会出现此错误。如果我让它自然失败:
  • /srv/www/.virtualenvs/k-state-union/lib/python2.6/site-packages/pyelasticsearch/client.py:
    from simplejson import JSONDecodeError
    在 python 解释器中工作。

这些错误似乎表明我没有使用pyelasticsearchhaystack 的预期版本。我需要做什么才能启动并运行它?

【问题讨论】:

  • 你在使用virtualenv吗?
  • @HieuNguyen 是的,我确实使用 virtualenv。

标签: django django-haystack pyelasticsearch


【解决方案1】:

Elasticsearch 有两个不同的 Python 库。我从 pyelasticsearch 切换到 elasticsearch 并且它起作用了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-29
    相关资源
    最近更新 更多