solr的unique-key的fieldtype必须为string类型
今天发现了一个以前没有注意的问题,solr的schema.xml配置文件中,unique-key的field必须是string类型,否则会报错。
org.apache.solr.common.SolrException: QueryElevationComponent requires the schema to have a uniqueKeyField implemented using StrField
解决办法,删除solrconfig.xml配置文件中的Elevation组件的配置
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy" >
solr wiki中提到
http://wiki.apache.org/solr/QueryElevationComponent#elevate.xml