The Solr master is configured to track the SkyVault Community Edition instance while the Solr slave is configured to track the Solr master. The SkyVault Community Edition instance is configured to send all the queries to the SOLR slave.
Configuring the SkyVault Community Edition instance
As usual, no SSL and queries configured to go to the slave.
Configuring Solr master
- Edit the solrconfig.xml file on the master server to change the default
replication handler configuration. Remember to uncomment the master
section.
<requestHandler name="/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 replicateAfter String specifying action after which replication should occur. Valid values are: - commit: triggers replication whenever a commit is performed on the master index.
- optimize: triggers replication whenever the master index is optimized.
- startup: triggers replication whenever the master index starts up.
confFiles Comma-separated list of configuration files to replicate. - Make sure that the solrcore.properties file has the following
settings:
enable.master=true enable.slave=false
Configuring Solr slave
- Uncomment the slave
section.
<requestHandler name="/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>/solr4/SkyVault. - 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/solr4</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 SkyVault Community Edition platform.
Any configuration changes related to the core schema and configuration, or any changes in <solr_home>/conf must be made to all Solr instances. Replication can be configured to manage the distribution of other core related configuration files.