一次在多个内核中更新 solr 中的托管模式文件
Update managed-schema file in solr in multiple cores at once
我正在研究 Solr。我有多个具有相同字段和类型(相同架构)的核心。每个核心在 Solr 中都有自己的架构(托管架构)文件。我想为所有核心的架构添加新字段。
我正在通过每个核心的管理面板进行操作 manually.Is 我可以通过任何方式将新字段一次添加到所有核心的架构中。
将您的内核配置为 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 中都有自己的架构(托管架构)文件。我想为所有核心的架构添加新字段。
我正在通过每个核心的管理面板进行操作 manually.Is 我可以通过任何方式将新字段一次添加到所有核心的架构中。
将您的内核配置为 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
参数设置为您的配置集的名称来重新添加内核。