Updating a SolrCloud schema in a live enviroment
I can guarantee this will happen to you at some point: You find out that you need to add some more feilds in a Solr schema becouse you want to index some more data from you're documents. Does that mean taking down the live nodes, changing the schema and then start them up again? Thankfully, no. With the help of Zookeeper and the Solr schema REST API we can do this live without any pain.
The API calls:
First of, let's update the new config to the zookeeper:
./zkcli.sh -zkhost myZookeeper:2181 -cmd upconfig -confname myConfig -confdir /path/to/my/conf/
Then just reload the core (I do this on the shard leader out of habit):
curl http://mySolrNode:8983/solr/admin/cores?action=reload&core=myCore
This trick has saved me many times.