2016-10-27 17 views
0

我正在将Solr 4应用程序迁移到Solr 6.2.0。我的模式包含以下字段:QueryElevationComponent要求模式具有uniqueKeyField

<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 

我错过了什么?

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

+0

请问您的架构有一个 “id” 字段?你也使用QueryElevationComponent?如果没有,你可以从solrConfig文件中删除它的引用。 – jay

+0

请参阅https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java#L191。 –

+0

是的,模式有一个id字段。虽然我只注意到它出现在uniqueKey声明之后。这可能是问题吗? – Klaus

回答