solr一些异常

使用solr1.4跟solr3.1时,配置了个唯一id类型是sint 或者int,启动时在tomcat后台就会抛出这个异常:

org.apache.solr.common.SolrException:

 QueryElevationComponent requires the schema to have a uniqueKeyField implemented using StrField。

 

之前都是将sint或者int换为StrField类型解决问题的,后来发现只要去掉solrconfig.xml配置的 即 Elevation 组件就可以了:

 

<!-- a search component that enables you to configure the top results for a given query regardless of the normal lucene scoring.--> <searchComponent name="elevator" class="solr.QueryElevationComponent" > <!-- pick a fieldType to analyze queries --> <str name="queryFieldType">string</str> <str name="config-file">elevate.xml</str> </searchComponent> <!-- a request handler utilizing the elevator component --> <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy"> <lst name="defaults"> <str name="echoParams">explicit</str> </lst> <arr name="last-components"> <str>elevator</str> </arr> </requestHandler>

 


 

你可能感兴趣的:(tomcat,Solr,Lucene,search,query,Class)