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 Rakhi Khatwani <rk...@gmail.com> on 2009/07/02 12:36:43 UTC

Adding shards entries in solrconfig.xml

Hi,
     I read the following article:
http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Scaling-Lucene-and-Solr

its mentioned that   its much easier to set the shards parameter for your
SearchHandler in solrcofig.xml.

i also went through:
http://www.nabble.com/newbie-question-on-SOLR-distributed-searches-with-many-%22shards%22-td20687487.html
but it gives a wage idea about setting the shards. particularly the syntax.

Can anyone given an example of setting the shards parameter in
solrconfig.xml.

Regards,
Raakhi

Re: Adding shards entries in solrconfig.xml

Posted by Mark Miller <ma...@gmail.com>.
Rakhi Khatwani wrote:
> Hi,
>      I read the following article:
> http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Scaling-Lucene-and-Solr
>
> its mentioned that   its much easier to set the shards parameter for your
> SearchHandler in solrcofig.xml.
>
> i also went through:
> http://www.nabble.com/newbie-question-on-SOLR-distributed-searches-with-many-%22shards%22-td20687487.html
> but it gives a wage idea about setting the shards. particularly the syntax.
>
> Can anyone given an example of setting the shards parameter in
> solrconfig.xml.
>
> Regards,
> Raakhi
>
>   
<requestHandler name="standard" class="solr.SearchHandler" default="true">
  <!-- default values for query parameters -->

  <lst name="defaults">
  <str name="echoParams">explicit</str>
  <str name="shards">localhost:8983/solr,localhost:7574/solr</str>
</lst>
</requestHandler>

Thats an example of the syntax though. Don't do it on the standard 
request handler or you will create an infinite loop. Define a different 
handler.

-- 
- Mark

http://www.lucidimagination.com




Re: Adding shards entries in solrconfig.xml

Posted by Otis Gospodnetic <ot...@yahoo.com>.
Rakhi,

Have you looked at Solr example directories (in Solr svn)?  There may be an example of it there.  From memory, the syntax is:
<shards>URL1,URL2 .... </shards>



e.g.
<shards>http://shard1:8080/solr,http://shard2:8080/solr</shards>

This goes into one of the sections of the request handler configuration.  Shards can also be specified in the "shards" param in the URL itself.

Otis --
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----
> From: Rakhi Khatwani <rk...@gmail.com>
> To: solr-user@lucene.apache.org
> Cc: ninad.raut@germinait.com
> Sent: Thursday, July 2, 2009 6:36:43 AM
> Subject: Adding shards entries in solrconfig.xml
> 
> Hi,
>      I read the following article:
> http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Scaling-Lucene-and-Solr
> 
> its mentioned that   its much easier to set the shards parameter for your
> SearchHandler in solrcofig.xml.
> 
> i also went through:
> http://www.nabble.com/newbie-question-on-SOLR-distributed-searches-with-many-%22shards%22-td20687487.html
> but it gives a wage idea about setting the shards. particularly the syntax.
> 
> Can anyone given an example of setting the shards parameter in
> solrconfig.xml.
> 
> Regards,
> Raakhi