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 Ken Krugler <kk...@transpac.com> on 2018/07/14 00:09:23 UTC

Is router.field an explicit shard name, or hashed?

Hi all,

From https://lucene.apache.org/solr/guide/6_6/shards-and-indexing-data-in-solrcloud.html#ShardsandIndexingDatainSolrCloud-DocumentRouting <https://lucene.apache.org/solr/guide/6_6/shards-and-indexing-data-in-solrcloud.html#ShardsandIndexingDatainSolrCloud-DocumentRouting>, and various posts on the mailing list, the implication is that the content of the “router.field” field is used as the shard name.

But on https://lucene.apache.org/solr/guide/6_6/collections-api.html#CollectionsAPI-create <https://lucene.apache.org/solr/guide/6_6/collections-api.html#CollectionsAPI-create>, the description of “router.field” says:

> If this field is specified, the router will look at the value of the field in an input document to compute the hash and identify a shard instead of looking at the uniqueKey field


I’m wondering which is correct.

Thanks,

— Ken

--------------------------
Ken Krugler
+1 530-210-6378
http://www.scaleunlimited.com
Custom big data solutions & training
Flink, Solr, Hadoop, Cascading & Cassandra


Re: Is router.field an explicit shard name, or hashed?

Posted by da...@gmail.com.
The value of the router.field is hashed.

On Sat, 14 Jul 2018 at 10:09, Ken Krugler <kk...@transpac.com>
wrote:

> Hi all,
>
> From
> https://lucene.apache.org/solr/guide/6_6/shards-and-indexing-data-in-solrcloud.html#ShardsandIndexingDatainSolrCloud-DocumentRouting
> <
> https://lucene.apache.org/solr/guide/6_6/shards-and-indexing-data-in-solrcloud.html#ShardsandIndexingDatainSolrCloud-DocumentRouting>,
> and various posts on the mailing list, the implication is that the content
> of the “router.field” field is used as the shard name.
>
> But on
> https://lucene.apache.org/solr/guide/6_6/collections-api.html#CollectionsAPI-create
> <
> https://lucene.apache.org/solr/guide/6_6/collections-api.html#CollectionsAPI-create>,
> the description of “router.field” says:
>
> > If this field is specified, the router will look at the value of the
> field in an input document to compute the hash and identify a shard instead
> of looking at the uniqueKey field
>
>
> I’m wondering which is correct.
>
> Thanks,
>
> — Ken
>
> --------------------------
> Ken Krugler
> +1 530-210-6378
> http://www.scaleunlimited.com
> Custom big data solutions & training
> Flink, Solr, Hadoop, Cascading & Cassandra
>
>