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 sriram <Sr...@ask.com> on 2013/11/06 23:39:58 UTC

Solr cloud : Changing properties of alreadt loaded collection

Hi,

Is it possible to change the properties of collection after it has been
created in solr cloud? I want to change the number of replicas, number of
shards, number of shards per node for an already existing collection.

I changed those properties while creating a collection using the steps
mentioned in 
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-CreateaCollection

But after creating a collection, I am not able to reload the collection with
these properties. I did one not so elegant way of doing this by clearing the
zookeeper data and starting with numShards=<new value> and it picked it up.
I want to do that gracefully through some of the available RestAPI.

Also if I have 2 collections, each with their separate conf, can someone
tell how to give conf1 to collection1 and conf2 to collection2 while giving
in the bootstap_confdir when I start the server from command line?

Thanks,
Sriram





--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-cloud-Changing-properties-of-alreadt-loaded-collection-tp4099671.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr cloud : Changing properties of alreadt loaded collection

Posted by sriram <Sr...@ask.com>.
Thanks a lot Erick. I could get that working in my environment.

Kind Regards,
V.Sriram



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-cloud-Changing-properties-of-alreadt-loaded-collection-tp4099671p4100062.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr cloud : Changing properties of alreadt loaded collection

Posted by Erick Erickson <er...@gmail.com>.
You have several things here.

First, changing the number of replicas is easy, just create
another node and associate it with a shard of an existing
collection. See the shard= param on the solrcloud page
when creating nodes. If you don't specify a shard, it'll
just be assigned to one of the existing shards on a round-robin
basis.

Changing the number of shards can be accomplished by
the splitshard command.

I confess I don't quite know about the number of shards
per node bit...

As far as separate collections, note on the bootstrap command
you have the collection.configname paramater that creates a
named configuration set. Then when creating a collection,
you'll see the collection.configname parameter again that can
refer to the one you uploaded with the second bootstrap
command.

You can also push your configurations directly up to ZK with
the ZK command-line tool and refer to them with collection.configname
when creating collections.

Best,
Erick


On Wed, Nov 6, 2013 at 5:39 PM, sriram <Sr...@ask.com> wrote:

> Hi,
>
> Is it possible to change the properties of collection after it has been
> created in solr cloud? I want to change the number of replicas, number of
> shards, number of shards per node for an already existing collection.
>
> I changed those properties while creating a collection using the steps
> mentioned in
>
> https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-CreateaCollection
>
> But after creating a collection, I am not able to reload the collection
> with
> these properties. I did one not so elegant way of doing this by clearing
> the
> zookeeper data and starting with numShards=<new value> and it picked it up.
> I want to do that gracefully through some of the available RestAPI.
>
> Also if I have 2 collections, each with their separate conf, can someone
> tell how to give conf1 to collection1 and conf2 to collection2 while giving
> in the bootstap_confdir when I start the server from command line?
>
> Thanks,
> Sriram
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-cloud-Changing-properties-of-alreadt-loaded-collection-tp4099671.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>