在空Solr内核上重新索引

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

在Docker容器中运行Solr,并使用sunspot_rails gem访问它。在Solr容器中创建了空核心:

solr create -c app

这是我的sunspot.yaml

production:
  solr:
    hostname: solr
    port: 8983
    log_level: WARNING
    path: /solr/app

当我运行rake sunspot:solr:reindex时遇到此错误:

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {
  "responseHeader":{
    "status":400,
    "QTime":1},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"undefined field type",
    "code":400}}

URI: http://solr:8983/solr/app/update?wt=json
Request Headers: {"Content-Type"=>"application/json"}
Request Data: "{\"delete\":{\"query\":\"type:Form\"}}"

如何用空核重新编制索引?

solr sunspot-rails
1个回答
0
投票

使用recipedude/solr-sunspot Docker映像解决了此问题。了解有关此问题的更多信息:

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