0

我正在将 Solr 4 应用程序迁移到 Solr 6.2.0。我的架构包括以下字段:

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

我正在使用经典模式。但除此之外,我不断收到以下异常:

"error-class","org.apache.solr.common.SolrException",
       "root-error-class","org.apache.solr.common.SolrException"],
     "msg":"QueryElevationComponent requires the schema to have a uniqueKeyField.",
     "trace":"org.apache.solr.common.SolrException: QueryElevationComponent requires the schema to have a uniqueKeyField.\n\tat 

我错过了什么?

编辑:从以下问题的架构中添加了字段声明。

4

1 回答 1

0

来自文档:“请注意,如果您在 solrconfig.xml 中启用了 QueryElevationComponent,则它要求架构具有 StrField 类型的 uniqueKey。例如,它不能是 int 字段。”

另见:

https://wiki.apache.org/solr/SchemaXml#The_Unique_Key_Field https://wiki.apache.org/solr/QueryElevationComponent#elevate.xml

于 2017-01-12T00:14:03.233 回答