Thanks so much for answering! "it looks like you're doing time based sharding, and one would normally not use the compositeId router for that."
What would be the recommend router or alternative if we wanted to do time-based sharding? We are using business date to build composite key (it's a String, without timestamp) and per business date we're expecting about 3 million documents. -----Original Message----- From: ysee...@gmail.com [mailto:ysee...@gmail.com] On Behalf Of Yonik Seeley Sent: Friday, June 21, 2013 8:50 PM To: solr-user@lucene.apache.org Subject: Re: shardkey On Fri, Jun 21, 2013 at 6:08 PM, Joshi, Shital <shital.jo...@gs.com> wrote: > But now Solr stores composite id in the document id Correct, it's the document id itself that contains everything needed for tje compositeId router to determine the hash. > It would only use it to calculate hash key but while storing compositeId routing is when it makes sense to make the routing part of the unique id so that an id is all the information needed to find the document in the cluster. For example customer_id!document_name. From your example of 20130611!test_14 it looks like you're doing time based sharding, and one would normally not use the compositeId router for that. -Yonik http://lucidworks.com