Solr:在 SolrCloud 设置中使用 configSet 添加内核不起作用 [英] Solr: Adding cores using a configSet in a SolrCloud setup does not work
问题描述
我的 SolrCloud (v5.2) 设置有 2 个不同的内核 [users, docs
] 正常工作.
I have a SolrCloud (v5.2) setup with 2 different cores [users, docs
] working properly.
现在我需要能够动态添加新的内核,这些内核在配置上与已经存在的 docs
内核相同.我不想复制配置(我试过它工作正常),因为我需要实际共享 synonyms.txt
和其他一些不断变化的文件.
Now I need to be able to dynamically add new cores that are configuration-wise identical to the docs
core that already exists. I don't want to duplicate the configuration (I tried an it works OK) as I need to actually share the synonyms.txt
and some other files that constantly change.
我认为我需要配置集",但我无法让它们工作.我使用以下命令上传了模板"配置:
I think that I need "configsets" but I cannot get them to work. I uploaded the "template" conf using this command:
sh zkcli.sh -zkhost zk1:2181 -cmd upconfig -confname template -confdir /home/user1/template/conf
然后我尝试使用 template
配置集创建一个新的核心,如下所示:
And then I tried to create a new core using the template
configset like this:
http://solr1:8983/solr/admin/cores?action=CREATE&configSet=template&name=test1
但我收到此错误:
Error CREATEing SolrCore 'test1': Unable to create core [test1] Caused by: Could not find configName for collection test1 found:[users, docs, template, .system]
我认为我对配置集的工作方式缺少一些知识.
I think that I have some missing knowledge on how configsets work.
推荐答案
您可以共享 Core 的配置并创建一个新的集合.对配置的任何更改都会影响所有集合.
You can share a configuration for a Core and just create a new Collection. Any changes to the configuration will affect all Collections.
使用此调用创建新集合:
Use this call to create the new Collection:
http://solr1:8983/solr/admin/collections?action=CREATE&name=test1&collection.configName=docs&numShards=1
这篇关于Solr:在 SolrCloud 设置中使用 configSet 添加内核不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!