Vikas Singh Rathaur
Vikas Singh Rathaur

Reputation: 29

creation of Solr shard

I am trying to create multiple shard in SOLR but i am not able to create and getting error :

Cannot create collection dummypersoncollection(collectionName). Value of maxShardsPerNode is 1, and the number of live nodes is 1. This allows a maximum of 1 to be created. Value of numShards is 2 and value of replicationFactor is 1

  1. is it possible for us to configure Solr to increase maxShardsPerNode? if yes the let me know how to create

Thanks in advance

Upvotes: 1

Views: 1563

Answers (1)

Cuong T.Tran
Cuong T.Tran

Reputation: 81

You can provide maxShardsPerNode argument when creating the collection. For example:

curl "http://server:port/solr/admin/collections?action=CREATE&name=collection_name&numShards=5&replicationFactor=3&maxShardsPerNode=5&collection.configName=config_name&shards=s0,s1,s2,s3,s4"

It will create a collection with 5 shards, 2 replicas each. If you have 2 nodes, maxShardsPerNode must be at least 5 to hold 10 replicas (if you set it lower, you get the error)

Upvotes: 1

Related Questions