Absolutely. You haven't said which version of Solr you're using, but there are several possibilities: 1> create the collection with replicationFactor=1, then use the ADDREPLICA command to specify exactly what node the replicas for each shard are created on with the 'node' parameter. 2> For recent versions of Solr, you can create a collection with _no_ replicas and then ADDREPLICA as you choose.
Best, Erick On Tue, Mar 29, 2016 at 5:10 AM, Salman Ansari <salman.rah...@gmail.com> wrote: > Hi, > > I believe the default behavior of creating collections distributed across > shards through the following command > > http:// > [solrlocation]:8983/solr/admin/collections?action=CREATE&name=[collection_name]&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=[configuration_name] > > is that Solr will create the collection as follows > > *shard1: *leader in server1 and replica in server2 > *shard2:* leader in server2 and replica in server1 > > However, I have seen cases when running the above command that it creates > both the leader and replica on the same server. > > Wondering if there is a way to control this behavior (I mean control where > the leader and the replica of each shard will reside)? > > Regards, > Salman