--- On Tue, 8/28/12, bsargurunathan <bsargurunat...@gmail.com> wrote:
> From: bsargurunathan <bsargurunat...@gmail.com> > Subject: Re: Solr Master/Slave setup issue > To: solr-user@lucene.apache.org > Date: Tuesday, August 28, 2012, 8:54 PM > Hi iorixxx, > Thanks for the updates, its really helpful for me. But I > want one more > clarification, > > I am setting up the solrcofig.xml like as follows, > <requestHandler name="/replication" > class="solr.ReplicationHandler" > > <lst > name="master"> > <str > name="enable">${enable.master:false}</str> > <str > name="replicateAfter">commit</str> > <str > name="confFiles">schema.xml,stopwords.txt</str> > </lst> > <lst > name="slave"> > <str > name="enable">${enable.slave:false}</str> > > <str > name="masterUrl">http://localhost:8080/ndxservice/registry/replication</str> > > <str > name="pollInterval">00:00:5</str> > </lst> > </requestHandler> > In above config, I did the enable/disable of solr/master > using > solrcore.properties file, > but I want set up the masterUrl from java code or my app > setting.xml. How it > is really possible? It is possible for an one time replication. "Force a fetchindex on slave from master command: http://slave_host:port/solr/replication?command=fetchindex It is possible to pass on extra attribute 'masterUrl' or other attributes like 'compression' (or any other parameter which is specified in the <lst name="slave"> tag) to do a one time replication from a master. This obviates the need for hardcoding the master in the slave. " In past I implemented a request handler that writes/updates solrcore.properties file. That can be an option too. (Where $MASTER_CORE_URL) is defined in a solrcore.properties)