2

schema.xml用 nutch替换了 Solr schema.xml。但是当我再次运行 Solr 时,Solr 日志打印出这个错误:

错误 - 2015-06-09 09:54:30.279; [] org.apache.solr.core.CoreContainer;创建核心 [mycore] 时出错:无法为核心 mycore 加载 conf:字段 cityConfidence 上指定的未知字段类型“int”。架构文件是 /opt/solr-5.1.0/server/solr/mycore/conf/schema.xml org.apache.solr.common.SolrException:无法为核心 mycore 加载 conf:字段 cityConfidence 上指定的未知字段类型“int” . 架构文件是 /opt/solr-5.1.0/server/solr/mycore/conf/schema.xml

4

2 回答 2

1

问题是 Nutchschema.xml文件不包含字段int使用的字段类型cityConfidence。要解决此问题,只需在schema.xml文件中包含以下行:

<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>

确保您的字段使用的所有字段类型都在您的schema.xml文件中声明。

于 2015-06-09T04:07:22.683 回答
0

尝试schema-solr4.xml而不是 schema.xml

于 2015-06-10T01:50:24.853 回答