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 Customer <ma...@gmail.com> on 2016/10/10 11:49:25 UTC

Rename shards ?

Hey,

is there a way to rename shards or ideally give them names when creating 
collection? For example instead of names like Shard1, Shard2 on admin 
page I would like to see countries instead, for example GB, US, AU etc ...

Is there any way to do that ?

Thanks

Re: Rename shards ?

Posted by Erick Erickson <er...@gmail.com>.
That doesn't make a great deal of sense no the surface. If you're
using the default document routing is a hash of the <uniqueKey> modulo
(# shards), so there's no good way for you to put docs all from GB on
the same shard.

If you're using the "implicit router", you can simply use the
collections CREATESHARD and give it whatever name you want...

I suspect this an "XY" problem. Why do you want to name your shards?
If you tell us the use-case, perhaps we can have more cogent
responses.

Best,
Erick

On Mon, Oct 10, 2016 at 7:49 AM, Customer <ma...@gmail.com> wrote:
> Hey,
>
> is there a way to rename shards or ideally give them names when creating
> collection? For example instead of names like Shard1, Shard2 on admin page I
> would like to see countries instead, for example GB, US, AU etc ...
>
> Is there any way to do that ?
>
> Thanks