Solr:在SolrCloud设置中使用configSet添加核心不起作用 [英] Solr: Adding cores using a configSet in a SolrCloud setup does not work

查看:78
本文介绍了Solr:在SolrCloud设置中使用configSet添加核心不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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.

我认为我需要"configsets",但是我无法使它们正常工作.我使用以下命令上传了模板" conf:

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 configset创建一个新的核心,如下所示:

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的配置,而只需创建一个新Collection.对配置的任何更改都会影响所有集合.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆