lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: Solr Collection API doesn't seem to be working
Date Thu, 03 Jan 2013 16:26:03 GMT
On Thu, Jan 3, 2013 at 8:46 AM, Per Steffensen <> wrote:
> There are defaults for both replicationFactor and maxShardsPerNode, so non
> of them HAS to be provided - default is 1 in both cases.
>       int repFactor = msgStrToInt(message, REPLICATION_FACTOR, 1);
>       int maxShardsPerNode = msgStrToInt(message, MAX_SHARDS_PER_NODE, 1);
> Remember than replicationFactor decides how many "instances" of you shard
> you will get, so a value of 1 does not provide you any replication.
> On 1/3/13 3:46 AM, Yonik Seeley wrote:
>> On Wed, Jan 2, 2013 at 9:21 PM, davers <>
>> wrote:
>>> So by providing the correct replicationFactor parameter for the number of
>>> servers has fixed my issue.
>>> So can you not provide a higher replicationFactor than you have
>>> live_nodes?
> Yes, but you will end up with multiple replica of the same shard running on
> the same node. It is kinda pointless (IMHO), but might be ok if you later
> want to "move" one of the replica to a "new" node. I would prefer to not
> allow creating more replica than you have nodes (because it is kinda
> pointless) and then just copy data when you, in the future, create a new
> replica of a shard on a new node.

I agree - it's pointless to have two replicas of the same shard on a
single node.  But I'm talking about having replicationFactor as a
target, so when you start up *new* nodes they will become a replica
for any shard where the number of replicas is currently less than the

Ideally, one would be able to create a new collection with no nodes
initially assigned to it if desired.


View raw message