Here again, the solrconfig.xml file controls the configuration affecting replication. To configure the slave server, follow the steps below:
-
Uncomment the slave section.
<requestHandlername="/replication"class="solr.ReplicationHandler" > <!-- To enable simple master/slave replication, uncomment one of the sections below, depending on whether this solr instance should be the "master" or a "slave". If this instance is a "slave" you will also need to fill in the masterUrl to point to a real machine. --> <!-- <lst name="master"> <str name="replicateAfter">commit</str> <str name="replicateAfter">startup</str> <str name="confFiles">schema.xml,stopwords.txt</str> </lst> --> <lst name="slave"> <str name="masterUrl">http://your-master-hostname:8983/solr</str> <str name="pollInterval">00:00:60</str> </lst> </requestHandler>
where:
Parameter name Description pollInterval Interval in which the slave should poll master .Format is hh:mm:ss. If this is missing, the slave server does not poll automatically. masterUrl Fully qualified URL for the replication handler of master. Make sure the masterUrl ends with <tomcat base url>/solr/alfresco. -
Set the master URL to point to the Solr master. Also, set how often the slave server should poll for changes.
<str name="masterUrl">http://your-master-hostname:8983/solr/alfresco</str> <str name="pollInterval">00:00:60</str>
-
Set the following properties in the solrcore.properties file:
enable.master=false enable.slave=true
In this configuration, the Solr instance will only track model changes from the Alfresco Content Services platform.