如何将动态集合添加到SolrCloud

时间:2014-07-03 15:31:05

标签: solr apache-zookeeper solrcloud

当我尝试在SolrCLoud中创建新集合时,我收到错误消息

Specified config does not exist in ZooKeeper:my_new_collection

来自Apache Solr Reference Guide我了解了参数 **collection.configName** must already be stored in ZooKeeper 但是当我准备用新的配置文件创建一个新的集合时,如何以及何时可以告诉我的ZooKeeper新的配置文件?

是否真的没有将集合添加到Web中的SolrCore的示例?我只找到了向节点添加分片的教程,但没有找到将集合添加到SolrCloud的内容。

1 个答案:

答案 0 :(得分:0)

如果您使用的是embed zookeeper(在localhost:9983上运行)。您需要通过zkcli.sh脚本将配置上传到zookeeper。 例如:

  

./ zkcli.sh -cmd upconfig -zkhost localhost:9983 -confname   your_config_name -confdir / path / to / your / config

如果您使用的是solr 5.x版并在云模式下运行,则可以逐步指定创建功能完整的集合,然后再重新上载自定义配置。