On Tue, Dec 8, 2009 at 2:43 PM, Thijs <vonk.th...@gmail.com> wrote: > Hi > > I need some help setting up dynamic multicore replication. > > We are changing our setup from a replicated single core index with multiple > document types, as described on the wiki[1], to a dynamic multicore setup. > We need this so that we can display facets with a zero count that are unique > to the document 'type'. > > So when indexing new documents we want to create new cores on the fly using > the CoreAdminHandler through SolrJ. > > What I can't figure out is how I setup solr.xml and solrconfig.xml so that a > core automatically is also replicated from the master to it's slaves once > it's created. > > I have a solr.xml that starts like this: > > <?xml version='1.0' encoding='UTF-8'?> > <solr persistent="true"> > <cores adminPath="/admin/cores"> > </cores> > </solr> > > and the replication part of solrconfig.xml > master: > <requestHandler name="/replication" class="solr.ReplicationHandler"> > <lst name="master"> > <str name="replicateAfter">startup</str> > <str name="replicateAfter">optimize</str> > <str name="confFiles">schema.xml</str> > </lst> > </requestHandler> > > slave: > <requestHandler name="/replication" class="solr.ReplicationHandler"> > <lst name="slave"> > <str name="masterUrl">http://localhost:8081/solr/replication</str> > <str name="pollInterval">00:00:20</str> > </lst> > </requestHandler> > > I think I should change the masterUrl in the slave configuration to > something like: > <str > name="masterUrl">http://localhost:8081/solr/${solr.core.name}/replication</str> > So that the replication automatically finds the correct core replication > handler. if you have dynamically created cores this is the solution. > > But how do I tell the slaves a new core is created, and that is should start > replicating those to? > > Thanks in advance. > > Thijs > > [1] > http://wiki.apache.org/solr/MultipleIndexes#Flattening_Data_Into_a_Single_Index > >
-- ----------------------------------------------------- Noble Paul | Systems Architect| AOL | http://aol.com