简体   繁体   中英

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

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM