gpt4 book ai didi

solr - 一次在多个内核中更新 solr 中的托管架构文件

转载 作者:行者123 更新时间:2023-12-05 02:58:01 26 4
gpt4 key购买 nike

我正在研究 Solr。我有多个具有相同字段和类型(相同架构)的核心。每个核心在 Solr 中都有自己的架构(托管架构)文件。我想为所有核心的架构添加新字段。

我正在通过每个核心的管理面板手动执行此操作。有什么方法可以同时将新字段添加到所有核心的架构中。

最佳答案

将您的内核配置为 use a configset instead .

On a multicore Solr instance, you may find that you want to share configuration between a number of different cores. You can achieve this using named configsets, which are essentially shared configuration directories stored under a configurable configset base directory.

来自引用手册:

If you are using Solr in standalone mode, configsets are created on the filesystem.

To create a configset, add a new directory under the configset base directory. The configset will be identified by the name of this directory. Then into this copy the configuration directory you want to share. The structure should look something like this:

/configset1
/conf
/managed-schema
/solrconfig.xml
/configset2
/conf
/managed-schema
/solrconfig.xml

The default base directory is $SOLR_HOME/configsets

To create a new core using a configset, pass configSet as one of the core properties. For example, if you do this via the CoreAdmin API:

curl http://localhost:8983/admin/cores?action=CREATE&name=mycore&instanceDir=path/to/instance&configSet=configset2

据我所知,没有办法让现有的核心使用配置集,所以你必须备份你的配置和核心,然后从 Solr 中删除核心(不要删除目录),然后将 configSet 参数设置为您的配置集的名称,重新添加内核。

关于solr - 一次在多个内核中更新 solr 中的托管架构文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59385972/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com