SOLRCloud相关操作:
启动:
bin/solr restart -e cloud
先在zookeeper上上传configName
/root/soft/solr-5.5.4/server/scripts/cloud-scripts/zkcli.sh -zkhost hadoop1:2181 -cmd upconfig -confdir /root/soft/solr-5.5.4/server/solr/contentindex/conf -confname itdaan
/root/soft/solr-5.5.4/server/scripts/cloud-scripts/zkcli.sh -zkhost hadoop1:2181 -cmd upconfig -confdir /root/soft/solr-5.5.4/server/solr/configsets/codeprj/conf -confname codeprj
创建collections
curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=itdaan&numShards=3&replicationFactor=1&collection.configName=itdaan'
curl 'http://localhost:8983/solr/admin/collections?action=CREATE&name=codeprj&numShards=3&replicationFactor=1&collection.configName=codeprj'
删除collections
curl 'http://localhost:8983/solr/admin/collections?action=DELETE&name=advertisement'
curl 'http://localhost:8983/solr/admin/collections?action=DELETE&name=contentindex'
curl 'http://localhost:8983/solr/admin/collections?action=DELETE&name=gettingstarted'
curl 'http://localhost:8983/solr/admin/collections?action=DELETE&name=question'
curl 'http://localhost:8983/solr/admin/collections?action=DELETE&name=shareitem'