Hoss,

>From the Solr 4.1 release highlights, under the SolrCloud enhancements
section:

"Collections that do not specify numShards at collection creation time use
custom sharding and default to the "implicit" router. Document updates
received by a shard will be indexed to that shard, unless a "*shard*"
parameter or document field names a different shard."


So it does appear that it is possible to use implicit document routing
under SolrCloud.

I do specify the numShards parameter and that might be the confusion. The
admin UI is telling me that the routing is 'implicit' when it might not be?
Shouldn't it be compositeID routing if I use numShards?

It might be that the change in 4.1 was not clear?
http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201303.mbox/%3c0aa0b422-f1de-4915-b602-53cb18492...@gmail.com%3E

I think that I need to experiment without the numShards parameter.

Ultimately what I want is that all the shards (=years) be queried if no
shard is explicitly specified.  But eventually the users will be able to
pick a given date range.  Then we want to query only the matching shards.
 Better ways to do it?


-Thierry












On Mon, Aug 12, 2013 at 7:39 PM, Chris Hostetter
<hossman_luc...@fucit.org>wrote:

>
> : If that is the case, I think that my settings are correct.   I still do
> not
> : explain why I have such growth on all the shards at the same time.
>
> you are missunderstanding how SolrCLoud works.
>
> Unless you go out of your way to override hte document routing, Solr will
> compute a logical shard to assign each doc to using a hash on the id -- it
> doesn't matter which physical node you send the doc to, solr will
> internally forward it to the correct physical nodes of the logical shard
> it belongs to.
>
> If it is important to you that a single shard represents a calander year,
> then you need to override the shard assignemnt algorithm -- either that,
> or use a distinct *collection* per claander year, and then do
> multi-collection queries when you want to execute queries across multiple
> years ... it all depends on what your "common case" queries are going to
> look like...
>
>
> https://cwiki.apache.org/confluence/display/solr/Shards+and+Indexing+Data+in+SolrCloud
> https://cwiki.apache.org/confluence/display/solr/Distributed+Requests
>
> : One thing I noticed is that three of them are leaders in the SolrCloud
> : admin UI graph.  Is that normal?
>
> if you have 4 shards, then there should be 4 leaders -- leaders are about
> coordinating the duplicate physical copies of each doc in each replica of
> hte logical shard -- if you only have 1 phyiscal replica of each logical
> shard, then every replica is it's own leader.
>
>
> -Hoss
>

Reply via email to