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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

kkrugler
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

Reply | Threaded
Open this post in threaded view
|

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

Damien Kamerman
The value of the router.field is hashed.

On Sat, 14 Jul 2018 at 10:09, Ken Krugler <[hidden email]>
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
>
>