Note, all extracted from http://wiki.apache.org/solr/SolrReplication

You'd put:

<requestHandler name="/replication" class="solr.ReplicationHandler" >
    <lst name="master">
        <!--Replicate on 'startup' and 'commit'. 'optimize' is also a
        valid value for replicateAfter. -->
        <str name="replicateAfter">startup</str>
        <str name="replicateAfter">commit</str>
    </lst>
</requestHandler>

into every box you want to be able to act as a master, then use:

http://slave_host:port/solr/replication?command=fetchindex&masterUrl=<your
master URL>

As the above page says better than I can, "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."

HTH, Upayavira

On Wed, 01 Dec 2010 06:24 +0100, "Tommaso Teofili"
<tommaso.teof...@gmail.com> wrote:
> Hi Upayavira,
> this is a good start for solving my problem, can you please tell how does
> such a replication URL look like?
> Thanks,
> Tommaso
> 
> 2010/12/1 Upayavira <u...@odoko.co.uk>
> 
> > Hi Tommaso,
> >
> > I believe you can tell each server to act as a master (which means it
> > can have its indexes pulled from it).
> >
> > You can then include the master hostname in the URL that triggers a
> > replication process. Thus, if you triggered replication from outside
> > solr, you'd have control over which master you pull from.
> >
> > Does this answer your question?
> >
> > Upayavira
> >
> >
> > On Tue, 30 Nov 2010 09:18 -0800, "Ken Krugler"
> > <kkrugler_li...@transpac.com> wrote:
> > > Hi Tommaso,
> > >
> > > On Nov 30, 2010, at 7:41am, Tommaso Teofili wrote:
> > >
> > > > Hi all,
> > > >
> > > > in a replication environment if the host where the master is running
> > > > goes
> > > > down for some reason, is there a way to communicate to the slaves to
> > > > point
> > > > to a different (backup) master without manually changing
> > > > configuration (and
> > > > restarting the slaves or their cores)?
> > > >
> > > > Basically I'd like to be able to change the replication master
> > > > dinamically
> > > > inside the slaves.
> > > >
> > > > Do you have any idea of how this could be achieved?
> > >
> > > One common approach is to use VIP (virtual IP) support provided by
> > > load balancers.
> > >
> > > Your slaves are configured to use a VIP to talk to the master, so that
> > > it's easy to dynamically change which master they use, via updates to
> > > the load balancer config.
> > >
> > > -- Ken
> > >
> > > --------------------------
> > > Ken Krugler
> > > +1 530-210-6378
> > > http://bixolabs.com
> > > e l a s t i c   w e b   m i n i n g
> > >
> > >
> > >
> > >
> > >
> > >
> >
> 

Reply via email to