Skip to content

Instantly share code, notes, and snippets.

@patrickperrone
Last active August 29, 2015 14:24
Show Gist options
  • Save patrickperrone/d0e111ca9e9954896028 to your computer and use it in GitHub Desktop.
Save patrickperrone/d0e111ca9e9954896028 to your computer and use it in GitHub Desktop.
Sample Master/Slave replication handler for solrconfig.xml
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="master">
<str name="enable">${enable.master:false}</str>
<str name="replicateAfter">optimize</str>
<str name="replicateAfter">commit</str>
<str name="backupAfter">optimize</str>
<str name="backupAfter">commit</str>
<str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str>
<str name="commitReserveDuration">00:00:10</str>
</lst>
<int name="maxNumberOfBackups">2</int>
<lst name="invariants">
<str name="maxWriteMBPerSec">16</str>
</lst>
<lst name="slave">
<str name="enable">${enable.slave:false}</str>
<!--fully qualified url for the replication handler of master. It is possible to pass on this as
a request param for the fetchindex command-->
<str name="masterUrl">http://remote_host:port/solr/core_name/replication</str>
<!--Interval in which the slave should poll master .Format is HH:mm:ss . If this is absent slave does not
poll automatically. But a fetchindex can be triggered from the admin or the http API -->
<str name="pollInterval">00:00:20</str>
</lst>
</requestHandler>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment