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 "Meraj A. Khan" <me...@gmail.com> on 2015/01/01 21:09:19 UTC

Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

Shawn,

When running SolrCloud do you even have to include the shards parameter
,shouldnt only shards.qt parameter suffice?
On Dec 30, 2014 7:17 PM, "Shawn Heisey" <ap...@elyograg.org> wrote:

> On 12/30/2014 5:03 PM, Charles Sanders wrote:
> > Thanks for the suggestion.
> >
> > I did not do that originally because the documentation states:
> > This parameter is not required for the /select request handler.
> >
> > Which is what I am using. But I gave it a go, even though I'm not
> certain of the shard names. Now I have a NPE.
> >
> >
> solr/collection1/select?q=kernel+p&rows=1&wt=json&indent=true&shards.qt=/ac&shards=shard1,shard2
>
> If this is not SolrCloud, then the shards parameter must include most of
> the full base URL for each shard that you will be querying.  You can
> only use a bare shard name if you're running SolrCloud.
>
> The shards.qt parameter that you have used means that when the shards
> are consulted, the /ac handler will be used rather than /select.
>
> Here's an example of a shards parameter that will combine results from
> three cores on two machines.  When not running SolrCloud, this is how
> you do distributed searching:
>
> shards=
> idxa2.example.com:8981/solr/ai-inclive,idxa1.example.com:8981/solr/ai-0live,idxa2.example.com:8981/solr/ai-1live
>
> SolrCloud hides almost all of this complexity.
>
> Thanks,
> Shawn
>
>

Re: SpellCheck (AutoComplete) Not Working In Distributed Environment

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/1/2015 1:09 PM, Meraj A. Khan wrote:
> When running SolrCloud do you even have to include the shards parameter
> ,shouldnt only shards.qt parameter suffice?

If you are using SolrCloud, no shards parameter is required ... all
queries sent to either the collection or any shard replica will
automatically use all shards.  You *can* use the shards parameter if you
only want to query a subset of your shards, or distrib=false if you want
to only query the specific shard replica where you sent the request.

If it's not SolrCloud, there is no distributed search without the shards
parameter.

If you're using the /select handler, then shards.qt is not necessary at
all.  I do not know what SolrCloud does with handlers on distributed
requests, whether it uses the same handler name for those requests, or
uses /select by default like non-cloud does.

Thanks,
Shawn