lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <>
Subject default a parameter to a core's name
Date Mon, 09 Nov 2009 19:57:28 GMT

Is there a way for me to set up my solr.xml so that slave cores
replicate from the master's identically-named cores by default, but I
can override the core to replicate from if I wish? Something like
this, where core1 and core2 on the slave default to replicating from
foo/solr/core1 and foo/solr/core2, but core3 replicates from

# slave's solrconfig.xml
<!-- in slave replication section -->
<str name="masterUrl">http://foo/solr/${replicateCore}/replication</str>

# slave's solr.xml
  <property name="replicateCore" value="${}" />
    <core name="core1" /> <!-- defaults to replicating from foo/solr/core1 -->
    <core name="core2" /> <!-- defaults to replicating from foo/solr/core2 -->
    <core name="core3">
      <!-- replicates from foo/solr/core15 -->
      <property name="replicateCore" value="core15" />

This doesn't quite work because is not a valid variable
outside the <cores> section.  I also tried putting
"${replicateCore:${}}" in the solrconfig.xml, but the
default in that case is literally "${}" -- the variable
expansion isn't recursive.

Thanks in advance for any pointers.


View raw message