user2862834 user2862834 - 11 months ago 52
Linux Question

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>

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.

at org.apache.solr.handler.component.QueryComponent.createMainQuery(
at org.apache.solr.handler.component.QueryComponent.regularDistributedProcess(
at org.apache.solr.handler.component.QueryComponent.distributedProcess(
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
at org.apache.solr.handler.RequestHandlerBase.handleRequest(

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

Answer Source

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.