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 "Huang, Daniel" <Da...@bnymellon.com> on 2016/10/12 19:26:25 UTC

questions about shard key

Hi,

I was reading about document routing with CompositId (https://cwiki.apache.org/confluence/display/solr/Shards+and+Indexing+Data+in+SolrCloud). The document says that I could prefix a shard key to a document ID like “IBM!12345”. It further mentioned that I could specify the number of bit for the shard key like “IBM/3!12345”. My question is, what is the default number of bit for the shard key when it is not specified? That is, what is n when “IBM/n!12345” is equivalent to “IBM/12345”.

Another question is regarding 2-level routing prefix. Does it support number of bit as well? For example, does something like “USA/2!IBM/3!12345” work?

Thanks
Daniel

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Re: questions about shard key

Posted by ha...@yahoo.com.INVALID.
See here:
https://lucidworks.com/blog/2013/06/13/solr-cloud-document-routing/

The default is to take 16 bits from the prefix and 16 from the ID.
Not sure about the second part of your question, maybe someone else can answer that. 

    On Wednesday, October 12, 2016 9:26 PM, "Huang, Daniel" <Da...@bnymellon.com> wrote:
 

 Hi,

I was reading about document routing with CompositId (https://cwiki.apache.org/confluence/display/solr/Shards+and+Indexing+Data+in+SolrCloud). The document says that I could prefix a shard key to a document ID like “IBM!12345”. It further mentioned that I could specify the number of bit for the shard key like “IBM/3!12345”. My question is, what is the default number of bit for the shard key when it is not specified? That is, what is n when “IBM/n!12345” is equivalent to “IBM/12345”.

Another question is regarding 2-level routing prefix. Does it support number of bit as well? For example, does something like “USA/2!IBM/3!12345” work?

Thanks
Daniel

The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses. 

Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.