Following shard splitting commands assume that a three node server is already setup and running using fictional
IPs 10.11.100.11, 22.214.171.124 and 30.33.300.33. All servers are assumed to be running on the default Solr
ports: 8983 for Solr and 9983 for Zookeeper.
With the above assumptions, following is the command to create a new collection
Number of servers required by the above command is numShards * replicationFactor = 2.
So make sure to setup a cloud with adequate number of servers before giving this command.
When this command runs on a bigger Solr Cloud (with server-count >= 2), following is the result:
Note the naming of the new collection’s cores.
mycollection_shard1_replica1 is "core" present on one server and
mycollection_shard1_replica2 is "core" present on another server.
But the name of the collection is still "mycollection".
This is somewhat different from the default "collection1” which is present in all the servers and still named "collection1".
Also, checkout the cloud configuration picture at
If there is no error, you should see the following (after refreshing the cloud config page):
With the below collections in place, it is easy to segregate data into multiple collections. This segregation
is particularly helpful when there are multiple teams trying to use the same Solr Cloud. Each team can create
its own collection, decide the number of shards and replicas for itself and manage it independently (like
using shard-splitting etc.) while remaining part of the larger Solr Cloud.
For writing, collections won’t talk to each other but for reading, it is possible to read at once from multiple
collections by means of Virtual Collection. A virtual collection is a group of
collections used for reading data at once from several collections.
Adding cores to a collection
Cores can be added to a collection by the following command: