lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Core property name ignored when creating collection using API
Date Wed, 04 Feb 2015 05:14:24 GMT
On 2/2/2015 1:08 AM, Avanish Raju wrote:
> I'm learning to create collections by http for a new solr instance. To
> create a new collection called "*user6*", I tried the following:
> &numShards=1&replicationFactor=2&property.instanceDir=*user6*&
> *user6*
> However, when I look at the status, instanceDir and dataDir are all fine,
> but the core name is instead: user6_shard1_replica1

This is exactly how Solr is designed to work.  Without this naming
scheme, it is impossible to host multiple shards for the same collection
on a single Solr instance, a feature that *many* users require.

I believe that in Solr 4.0.0, as well as the 4.0-ALPHA and 4.0-BETA
releases, the collections API actually would name all of the cores for a
collection with the same name as the collection, because it expected
them to all be on separate hosts.  Later releases use the naming scheme
you have encountered.

It is usually not a good idea to override the core naming that the
collections API creates (or the instanceDir/dataDir), but if you really
want to, and you understand all the ramifications completely, you can
use the Core Admin API to create the collection yourself manually.

Even with the XXXX_shardN_replicaM naming syntax for cores, you can
still use the collection name in requests, like this.  Such requests can
be sent to any solr instance in the cloud, and they will work properly:



View raw message