Skip to content

Instantly share code, notes, and snippets.

@FabioBatSilva
Last active June 10, 2017 17:39
Show Gist options
  • Save FabioBatSilva/d49712d3b3683f892899 to your computer and use it in GitHub Desktop.
Save FabioBatSilva/d49712d3b3683f892899 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
@mkanchwala
Copy link

Worked for me ! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment