1. 程式人生 > >sorl建立core和刪除core

sorl建立core和刪除core

solr刪除core

http://dmhadoop009:8900/solr/admin/collections?action=DELETE&name=XXXX

solr建立core

http://dmhadoop009:8900/solr/admin/collections?action=CREATE&name=XXXX&numShards=3&replicationFactor=3&maxShardsPerNode=3&property.schema=schemaXXX.xml&collection.configName=clusterconf

建立的時候拋異常

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load core configuration for core

指定的schemaXXX.xml 沒生效

寫個指令碼複製以下的內容:

java -classpath .:/data/solr/solr-lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost dmhadoop010:2181,dmhadoop009:2181,dmhadoop
011:2181 -confdir /data/solr/solr-config -confname clusterconf