Here again, the solrconfig.xml file controls the configuration affecting replication. To configure the slave server, follow the steps below:
-
Add the following lines to the solrconfig.xml file.
<requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="slave"> <str name="masterUrl">https://solr6master:8983/solr/alfresco</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
- Add the following mTLS client settings to solr.in.sh (Linux) or
solr.in.cmd (Windows)
files:
# Slave needs to connect to Master using client mTLS settings SOLR_SSL_CLIENT_KEY_STORE: "/opt/alfresco-search-services/keystore/ssl-repo-client.keystore" SOLR_SSL_CLIENT_KEY_STORE_PASSWORD: "keystore" SOLR_SSL_CLIENT_KEY_STORE_TYPE: "JCEKS" SOLR_SSL_CLIENT_TRUST_STORE: "/opt/alfresco-search-services/keystore/ssl-repo-client.truststore" SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD: "truststore" SOLR_SSL_CLIENT_TRUST_STORE_TYPE: "JCEKS"
In this configuration, the Solr instance will only track model changes from the Alfresco Content Services platform.