We manage a large number of solr cores for a number of groups.  To  make this 
manageable in production, we have a single 'multicore'  configuration with all 
cores deployed to a centralized NFS server, and  each solr server loads this 
shared configuration and writes its indexes  to local disks.  We have a number 
of properties to turn on and off  master/slave; and replication targets.  This 
lets us load certain  indexes on certain machines entirely via JVM properties.

As the number of cores grows, we would like to be a bit more efficient  and 
only 
load the cores that we will be using on each server.  I was  hoping to 
accomplish this by enabling and disabling the cores via  property subsititution 
in solr.xml and then I can pass the properties as  JVM parameters; but when I 
tried this it appears that solr.xml doesn't  respect the enable parameter that 
works other places in solr.  This is  the configuration I tried:

  <cores adminPath="/admin/cores">
    <core name="group1" instanceDir="group1" 
enable="${enable.core.group1:true}"/>
    <core name="group2" instanceDir="group2" 
enable="${enable.core.group2:true}"/>
    <core name="group3" instanceDir="group3" 
enable="${enable.core.group3:true}"/>
    <core name="group4" instanceDir="group4" 
enable="${enable.core.group4:true}"/>
    <core name="group5" instanceDir="group5" 
enable="${enable.core.group5:true}"/>
  </cores>
  
If this isn't supported, another idea was to create multiple solr.xml  files 
(solr1.xml, solr2.xml, solr3.xml, solr4.xml, etc); where each xml  file defines 
the set of cores that we want to load; and then pass some  JVM parameter which 
tells the multicore which xml file to load at  runtime.  However, I can't find 
any such parameter.  Is the code only  looking for "solr.xml" or is there some 
secret parameter I can use to  override?

Thanks



      

Reply via email to