简体   繁体   中英

In Solr Cloud, is QueryElevationComponent mandatory in distributed collection?

I have collection that is distributed over multiple solr cloud node. To disable uniqueKey in schema, I also disable QueryElevationComponent in solrconfig.xml.

<!--
  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
    <str name="queryFieldType">string</str>
    <str name="config-file">elevate.xml</str>
  </searchComponent>
-->

Configuration works fine in undistributed collection (1 shard, 1 rf). But if number of shards*rf are greater than 1, problem occures. When I execute query to distributed collection, than solr throws below exception.

java.lang.NullPointerException at org.apache.solr.handler.component.QueryComponent.createMainQuery(QueryComponent.java:852) at org.apache.solr.handler.component.QueryComponent.regularDistributedProcess(QueryComponent.java:721) at org.apache.solr.handler.component.QueryComponent.distributedProcess(QueryComponent.java:674) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:345) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)

Solr does not complain against indexing. Only querying is problem.

uniqueKey is required. as it will likely make routing in SolrCloud and document replacement in general fail.

Enable your uniqueKey in schema, if you are using solr in cloud mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM