【问题标题】:Failed to add documents to Solr (django + haystack)无法将文档添加到 Solr (django + haystack)
【发布时间】:2014-02-28 09:58:18
【问题描述】:

我正在使用 Django + Haystack 开发一个简单的搜索引擎。我正在学习这些教程:

在索引时

python manage.py rebuild_index

我收到此错误:

Failed to add documents to Solr: No connection adapters were found for 'localhost:8983/solr/update/?commit=true'

我更新了 schema.xml,重新启动了 solr 服务器,但错误仍然存​​在。我该如何解决?

【问题讨论】:

    标签: django solr indexing django-haystack


    【解决方案1】:

    发现问题。定义我写的 SearchIndex 模板:

    {{ object.title }}
    {{ object.user.get_full_name }}
    {{ object.body }}
    

    问题是“get_full_name”

    {{ object.title }}
    {{ object.user }}
    {{ object.body }}
    

    对象被索引。

    我认为用户模型没有标准方法“get_full_name”。

    【讨论】:

      猜你喜欢
      • 2015-06-04
      • 2016-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多