Websorl在构建schema.xml时返回错误“未知字段'django_ct'”

问题描述 投票:0回答:1

我们的网站使用Python 3.6.5和:

  • django的== 20年11月1日
  • Django的干草堆== 2.8.1
  • CERTIFI == 0.0.8
  • urllib3 <1.25,> = 1.21.1
  • pysolr == 3.8.1

[我用django-haystack生成了schema.xml(python manage.py build_solr_schema> schema.xml),然后将其粘贴到了websolr(heroku版本)中。

当我在命令下运行时:

heroku run python manage.py rebuild_index --app terradiem

我收到以下错误:

无法向Solr添加文档:Solr响应错误(HTTP 400):[原因:错误:[doc = naturalearth.naturalearthmerged.12001]未知字段'django_ct']

追踪(最近通话):更新文件“ /app/.heroku/python/lib/python3.6/site-packages/haystack/backends/solr_backend.py”,第72行self.conn.add(docs,commit = commit,boost = index.get_field_weights())

文件“ /app/.heroku/python/lib/python3.6/site-packages/pysolr.py”,第918行,添加overwrite = overwrite,handler = handler)

文件“ /app/.heroku/python/lib/python3.6/site-packages/pysolr.py”,第500行,在_update中)>

return self._send_request('post',path,message,{'Content-type':'text / xml; charset = utf-8'})

文件“ /app/.heroku/python/lib/python3.6/site-packages/pysolr.py”,第412行,在_send_request中提高SolrError(error_message%(resp.status_code,solr_message))pysolr.SolrError:Solr响应错误(HTTP 400):[原因:错误:[doc = naturalearth.naturalearthmerged.12001]未知字段'django_ct']

我想它与schema.xml中的以下几行有关:

<field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="django_ct" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="django_id" type="string" indexed="true" stored="true" multiValued="false"/>

任何线索?

我们的网站使用Python 3.6.5和以下版本运行:django == 1.11.20 django-haystack == 2.8.1 certifi == 0.0.8 urllib3 <1.25,> = 1.21.1 pysolr == 3.8.1我生成了架构带有django-haystack的.xml(python manage.py ...

django heroku solr django-haystack websolr
1个回答
0
投票

我无法使其与Solr一起使用。

© www.soinside.com 2019 - 2024. All rights reserved.