Core的创建删除是不能同步,只能同步Core中的数据
配置主节点:
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
<str name="confFiles">schema.xml,stopwords.txt</str>
<str name="httpBasicAuthUser">root</str>
<str name="httpBasicAuthPassword">root123</str>
</lst>
</requestHandler>
配置从节点:
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="slave">
<str name="masterUrl">http://XXX.XXX.X.XXX:8983/solr/${solr.core.name}/replication</str>
<str name="pollInterval">00:00:30</str>
<str name="compression">internal</str>
<str name="httpConnTimeout">50000</str>
<str name="httpReadTimeout">500000</str>
<str name="httpBasicAuthUser">root</str>
<str name="httpBasicAuthPassword">root123</str>
</lst>
</requestHandler>
网友评论