Pain-free Solr replication
Posted by Kelvin on 02 Dec 2015 | Tagged as: Lucene / Solr / Elasticsearch / Nutch
Here's a setup I use for totally pain-free Solr replication, and allowing you to switch masters/slaves quickly without messing with config files. Add this to solrconfig.xml <requestHandler name="/replication" class="solr.ReplicationHandler" > <str name="maxNumberOfBackups">1</str> <lst name="master"> <str name="enable">${enable.master:false}</str> <str name="replicateAfter">startup</str> <str name="replicateAfter">commit</str> <str name="confFiles">solrconfig.xml,schema.xml,stopwords.txt,elevate.xml</str> <str name="commitReserveDuration">00:00:10</str> </lst> <lst name="slave"> <str name="enable">${enable.slave:false}</str> <str name="masterUrl">http://${replication.master}:8983/solr/corename</str> <str name="pollInterval">00:00:20</str> <str name="compression">internal</str> […]