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 Scott Zhang <ma...@gmail.com> on 2010/06/10 05:48:34 UTC
how to have "shards" parameter by default
Hi. I am running distributed search on solr.
I have 70 solr instances. So each time I want to search I need to use
?shards=localhost:7500/solr,localhost......7620/solr
It is very long url.
so how can I encode shards into config file then i don't need to type each
time.
thanks.
Scott
Re: how to have "shards" parameter by default
Posted by Joe Calderon <ca...@gmail.com>.
youve created an infinite loop, the shard you query calls all other
shards and itself and so on, create a separate requestHandler and
query that, ex
<requestHandler name="/distributed_select" class="solr.SearchHandler">
<lst name="defaults">
<str name="shards">localhost:7500/solr,localhost:7501/solr,localhost:7502/solr,localhost:7503/solr,localhost:7504/solr,localhost:7505/solr,localhost:7506/solr</str>
</lst>
<arr name="components">
<str>facet</str>
<str>debug</str>
</arr>
</requestHandler>
On Wed, Jun 9, 2010 at 9:10 PM, Scott Zhang <ma...@gmail.com> wrote:
> I tried put "shards" into default request handler.
> But now each time if search, solr hangs forever.
> So what's the correct solution?
>
> Thanks.
>
> <requestHandler name="standard" class="solr.SearchHandler"
> default="true">
> <!-- default values for query parameters -->
> <lst name="defaults">
> <str name="echoParams">explicit</str>
>
> <int name="rows">10</int>
> <str name="fl">*</str>
> <str name="version">2.1</str>
> <str
> name="shards">localhost:7500/solr,localhost:7501/solr,localhost:7502/solr,localhost:7503/solr,localhost:7504/solr,localhost:7505/solr,localhost:7506/solr</str>
> <!-- -->
> </lst>
> </requestHandler>
>
> On Thu, Jun 10, 2010 at 11:48 AM, Scott Zhang <ma...@gmail.com>wrote:
>
>> Hi. I am running distributed search on solr.
>> I have 70 solr instances. So each time I want to search I need to use
>> ?shards=localhost:7500/solr,localhost......7620/solr
>>
>> It is very long url.
>>
>> so how can I encode shards into config file then i don't need to type each
>> time.
>>
>>
>> thanks.
>> Scott
>>
>
Re: how to have "shards" parameter by default
Posted by Scott Zhang <ma...@gmail.com>.
I tried put "shards" into default request handler.
But now each time if search, solr hangs forever.
So what's the correct solution?
Thanks.
<requestHandler name="standard" class="solr.SearchHandler"
default="true">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="fl">*</str>
<str name="version">2.1</str>
<str
name="shards">localhost:7500/solr,localhost:7501/solr,localhost:7502/solr,localhost:7503/solr,localhost:7504/solr,localhost:7505/solr,localhost:7506/solr</str>
<!-- -->
</lst>
</requestHandler>
On Thu, Jun 10, 2010 at 11:48 AM, Scott Zhang <ma...@gmail.com>wrote:
> Hi. I am running distributed search on solr.
> I have 70 solr instances. So each time I want to search I need to use
> ?shards=localhost:7500/solr,localhost......7620/solr
>
> It is very long url.
>
> so how can I encode shards into config file then i don't need to type each
> time.
>
>
> thanks.
> Scott
>