Reloading SolrCloud configuration (stored on Zookeeper) - schema.xml

后端 未结 4 740
傲寒
傲寒 2020-12-13 10:21

I have setup a SolrCloud replication using standalone zookeeper. But now I wish to make some changes to my Schema.xml and reload the core. The problem is that when I run a s

4条回答
  •  自闭症患者
    2020-12-13 11:14

    The answer marked as correct is wrong. You have to use Solr Collection API

    Once you have uploaded the new collection (index) configuration with the Solr zkcli.sh utility the configuration will not be reloaded automatically.

    Solr Collection API are indicated for SolrCloud and the configuration reload will be spread in the whole cluster. As far as I know Solr Collection API are available at least from Solr 4.8.

    The procedure is slightly different and with these API you can reload the configuration on the entire Cluster with only one API call.

    Just upload your updated configuration with the Solr zkcli.sh utility. Pay attention to do not confuse Solr zkcli.sh with Zookeeper zkCli.sh they have quite the same name but completely different purpose.

    So as said use Solr zkcli.sh (At time of writing is in the directory server/scripts/cloud-scripts):

    ./zkcli.sh -cmd upconfig -zkhost 127.0.0.1:2181 -collection collection1 -confname myconf -confdir path/to/solr/collection1/conf
    

    Then you can reload the configuration of collection1 with:

    http://server1:8983/solr/admin/collections?action=RELOAD&name=collection1
    

    The entire cluster will be updated.

提交回复
热议问题