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 Nitin Solanki <ni...@gmail.com> on 2015/03/18 07:32:52 UTC

Add replica on shards

Hi,
         I have created 8 shards on a collection named as ***wikingram**.
Now at that time, I were not created any replica. Now, I want to add a
replica on each shard. How can I do?
I created this - ** sudo curl
http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=wikingram&shard=shard1&node=localhost:8983_solr**
but it is not working.

It throws errror -


<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">86</int>
</lst>
<str name="Operation ADDREPLICA caused
exception:">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Could not find collection : null</str>
<lst name="exception">
<str name="msg">Could not find collection : null</str>
<int name="rspCode">400</int>
</lst>
<lst name="error">
<str name="msg">Could not find collection : null</str>
<int name="code">400</int>
</lst>
</response>

Any help on this?

Re: Add replica on shards

Posted by Nitin Solanki <ni...@gmail.com>.
Thanks Norgorn.
I did the same thing but in different manner..
like -

localhost:8983/solr/admin/cores?action=CREATE&name=wikingram_shard4_replica3&collection=wikingram&property.shard=shard4

On Wed, Mar 18, 2015 at 7:20 PM, Norgorn <ls...@mail.ru> wrote:

>
> U can do the same simply by something like that
>
>
> http://localhost:8983/solr/admin/cores?action=CREATE&collection=wikingram&name=ANY_NAME_HERE&shard=shard1
>
> The main part is "shard=shard1", when you create core with existing shard
> (core name doesn't matter, we use "collection_shard1_replica2", but u can
> do
> whatever u want), this core becomes a replica and copies data from leading
> shard.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Add-replica-on-shards-tp4193659p4193732.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Add replica on shards

Posted by Norgorn <ls...@mail.ru>.
U can do the same simply by something like that

http://localhost:8983/solr/admin/cores?action=CREATE&collection=wikingram&name=ANY_NAME_HERE&shard=shard1

The main part is "shard=shard1", when you create core with existing shard
(core name doesn't matter, we use "collection_shard1_replica2", but u can do
whatever u want), this core becomes a replica and copies data from leading
shard.



--
View this message in context: http://lucene.472066.n3.nabble.com/Add-replica-on-shards-tp4193659p4193732.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Add replica on shards

Posted by Nitin Solanki <ni...@gmail.com>.
Any help please...

On Wed, Mar 18, 2015 at 12:02 PM, Nitin Solanki <ni...@gmail.com>
wrote:

> Hi,
>          I have created 8 shards on a collection named as ***wikingram**.
> Now at that time, I were not created any replica. Now, I want to add a
> replica on each shard. How can I do?
> I created this - ** sudo curl
> http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=wikingram&shard=shard1&node=localhost:8983_solr**
> but it is not working.
>
> It throws errror -
>
>
> <response>
> <lst name="responseHeader">
> <int name="status">400</int>
> <int name="QTime">86</int>
> </lst>
> <str name="Operation ADDREPLICA caused
> exception:">org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> Could not find collection : null</str>
> <lst name="exception">
> <str name="msg">Could not find collection : null</str>
> <int name="rspCode">400</int>
> </lst>
> <lst name="error">
> <str name="msg">Could not find collection : null</str>
> <int name="code">400</int>
> </lst>
> </response>
>
> Any help on this?
>