Forked from FabioBatSilva/solr-cloud-update-schema.sh
Created
January 17, 2017 11:28
-
-
Save mkanchwala/9f63a50151d67915182c321b7b20caa7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CREATE COLLECTION | |
solr create_collection -c my_collection -shards 2 -d path-to-my-conf | |
// CHECK COLLECTION SCHEMA | |
curl http://solr-host.dev:8983/solr/my_collection/schema?wt=schema.xml | |
// SCHEMA ITS GOOD | |
// UPDATE SCHEMA | |
vim path-to-my-conf/conf/schema.xml | |
// UPDATE ZK CONFIG | |
zkcli.sh -z zk-host.dev:2181 -cmd upconfig -n my_config -d path-to-my-conf | |
// LINK COLLECTION | |
zkcli.sh -z zk-host.dev:2181 -cmd linkconfig -c my_collection -n my_config | |
// CHECK ZK SCHEMA SHOWS NEW SCHEMA | |
zkcli.sh -z zk-host.dev:2181 -cmd get /configs/my_collection/schema.xml | |
// new schema | |
// RELOAD COLLECTION | |
curl http://solr-host.dev:8983/solr/admin/collections?action=RELOAD&name=my_collection | |
// CHECK COLLECTION SCHEMA SHOWS OLD SCHEMA | |
curl http://solr-host.dev:8983/solr/my_collection/schema?wt=schema.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment