You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by jdleider <na...@justinleider.com> on 2009/02/20 16:32:43 UTC

Defining shards in solrconfig with multiple cores

Hey All,

I am trying to load balance two solr installations, solr1 and solr2. Each
box is running 4 cores, core0 - core3. I would like to define the shards for
each box in solrconfig as such:

<lst name="defaults">
     <str
name="shards">solr1:8080/solr/core0,solr1:8080/solr/core1,solr1:8080/solr/core2,solr1:8080/solr/core3</str>     
</lst>

For whatever reason the /admin works. However when i try to /select using
this shards param in the solrconfig.xml the query just hangs. Ive looked
everywhere trying to figure this one out and the syntax looks right. The
query works as it is supposed to when the shards param is removed from
solrconfig.xml and appended to the url. However, I cant use the load
balancer if i have to specify the shards host in the url. 

Am I doing something wrong or is this not supported yet? Is there a
workaround that I can use?

Thanks!

Justin

-- 
View this message in context: http://www.nabble.com/Defining-shards-in-solrconfig-with-multiple-cores-tp22120446p22120446.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Defining shards in solrconfig with multiple cores

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Mon, Feb 23, 2009 at 10:12 AM, jdleider <na...@justinleider.com> wrote:
> How can I be sure the shards are applying the same boosts as the one
> receiving the query?

Defaults always apply at any search handler... so if you put default
params on /business, they will become part of the shard sub-requests.
You can verify by looking at the logs and the shard search requests
received by each shard.

-Yonik
Lucene/Solr? http://www.lucidimagination.com

Re: Defining shards in solrconfig with multiple cores

Posted by jdleider <na...@justinleider.com>.
Excellent, I have created a new request handler that has all my shards,
boosts and other defaults as /business. /select is set to be the default
request handler. The queries seem to run fine now and after a bit of spot
checking they seem to be getting the same results. I have one question
though.

How can I be sure the shards are applying the same boosts as the one
receiving the query? I access the url:
solr1:8080/solr/core0/business?q=pizza Are the shards applying the boost on
their index with the /business request handler or is it up to the
originating shard to apply the boosts? 

Thanks for your help!

- Justin



Yonik Seeley-2 wrote:
> 
> On Fri, Feb 20, 2009 at 10:32 AM, jdleider <na...@justinleider.com>
> wrote:
>> However when i try to /select using
>> this shards param in the solrconfig.xml the query just hangs.
> 
> The basic /select url should normally not have shards set as a
> default... this will cause infinite recursion when the top level
> searcher sends requests to the sub-searchers until you exhaust all
> threads and run into a distributed deadlock.  Set up another handler
> with the default shards param instead.
> 
> -Yonik
> Lucene/Solr? http://www.lucidimagination.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Defining-shards-in-solrconfig-with-multiple-cores-tp22120446p22163349.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Defining shards in solrconfig with multiple cores

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Fri, Feb 20, 2009 at 10:32 AM, jdleider <na...@justinleider.com> wrote:
> However when i try to /select using
> this shards param in the solrconfig.xml the query just hangs.

The basic /select url should normally not have shards set as a
default... this will cause infinite recursion when the top level
searcher sends requests to the sub-searchers until you exhaust all
threads and run into a distributed deadlock.  Set up another handler
with the default shards param instead.

-Yonik
Lucene/Solr? http://www.lucidimagination.com