lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael <solrco...@gmail.com>
Subject Default query parameter for one core
Date Wed, 07 Oct 2009 17:46:54 GMT
I'd like to have 5 cores on my box.  core0 should automatically shard to
cores 1-4, which each have a quarter of my corpus.
I tried this in my solrconfig.xml:

  <requestHandler name="standard" class="solr.SearchHandler" default="true">
     <lst name="defaults">
       <str name="shards">${solr.core.shardsParam:}</str> <!-- aka, if the
core specifies a shardsParam, great, and if not, use nothing -->
     </lst>
  </requestHandler>

and this in my solr.xml:

<cores adminPath="/admin/cores" shareSchema="true">
  <core name="core0" instanceDir="./"

 shardsParam="localhost:9990/core1,localhost:9990/core2,localhost:9990/core3,localhost:9990/core4"
/>
  <core name="core1" instanceDir="./" dataDir="/home/search/data/1"/>
  <!-- etc for cores 2 through 4 -->
</cores>

Unfortunately, this doesn't work, because cores 1 through 4 end up
specifying a blank shards param, which is different from no shards param at
all -- it results in a NullPointerException.

Is there a way to not have the shards param at all for most cores, and for
core0 to specify it?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message