如何在 Solr 5.5 中使用 schema.xml 从旧版本重建主从多核

How to rebuild master-slave multi-core with schema.xml from old verison in Solr 5.5

我在旧版本的 Solr 中构建了 2 个 schema.xml 核心,1 个主节点和 2 个从节点。 master和slave都用solrcore.properties来表示自己的角色。例如对于slave(注意:对于master,我只是将true/false反转),它是:

enable.master=false
enable.slave=true
#define master url
MASTER_CORE_URL=192.168.1.222:8983/corea_SE
POLL_TIME=00:00:60

并且在 solrconfig.xml 中,我定义了角色的详细信息,例如:

<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <!-- Use solrcore.properties to switch the role for node -->
    <lst name="master">
       <str name="enable">${enable.master:false}</str>
       <str name="replicateAfter">startup</str>
       <str name="replicateAfter">commit</str>
       <str name="confFiles">schema.xml,stopwords.txt</str>
    </lst>
    <lst name="slave">
        <str name="enable">${enable.slave:false}</str>
        <str name="masterUrl">http://${MASTER_CORE_URL}/${solr.core.name}/replication</str>
        <str name="pollInterval">${POLL_TIME}</str>
     </lst>
</requestHandler>

我想在 Solr 5.5 中重建这个结构,但我在 Solr 5.5 下载包或 Apache Solr Reference Guide 中找不到这样的示例或说明。 Solr 5.5 甚至没有任何带有 schema.xml 或主从的示例。我怎样才能做到这一点?有任何文档或 url 可以帮助我吗?

只需添加

<!-- ### This tells Solr we're using manually-edit schema.xml ### -->
<schemaFactory class="ClassicIndexSchemaFactory"/>

在 Solrconfig.xml.