Custom sharding requires a CREATESHARD/DELETESHARD commands
It may not be applicable to hash based sharding
The "deleteShard" part is taken care of by SOLR-4693. It allows you to delete shards that have a null range (i.e. created for custom sharding) as well as those whose state is inactive.
Commit 1508968 from Noble Paul in branch 'dev/trunk'
[ https://svn.apache.org/r1508968 ]
SOLR-4221 SOLR-4808 SOLR-5006 SOLR-5017 SOLR-4222
Commit 1508981 from Noble Paul in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1508981 ]
The replicationFactor and maxShardsPerNode are read from the collection properties. This would require the cluster to have enough nodes for creating the new shards according to replicationFactor and maxShardsPerNode . If there aren't enough nodes the command would fail
The OverseerCollectionProcessor#createShard method supports the createNodeSet parameter, but the CollectionsHandler#handleCreateShard method does not copy that parameter from the request. Is this an oversight and intended feature for 4.5, or dead code, or just for future enhancement?
Also, action=CREATESHARD and action=DELETESHARD need to be added to the Solr refGuide.
Yes, It's an omission. Thanks for pointing it out
Let's open a separate issue for the ref guide
4.5 release -> bulk close