Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mkanchwala/9f63a50151d67915182c321b7b20caa7 to your computer and use it in GitHub Desktop.
Save mkanchwala/9f63a50151d67915182c321b7b20caa7 to your computer and use it in GitHub Desktop.
// 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