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 vishal patel <vi...@outlook.com> on 2020/01/02 08:18:43 UTC

Solr 8.3

When I am creating 2 shards and 2 replicas using admin panel, automatic assign a shard or replica to any IP.
I want to make the specific shard or replica to solr instance at the time of creating a collection. Can I?

Regards,
Vishal

Re: Solr 8.3

Posted by vishal patel <vi...@outlook.com>.
Thanks, Erick

The solution provided by you works for us. Regarding the reason to implement it is as below.

Current we use Solr 6.1 version and plan to switch to 8.3. In 6.1 the behavior is replica and shards of all collection maintain on separate. On production, many times we face replica goes into recovery mode. After some time if it not respond we required to restart it. Now, consider same scenario for 8.3 version and on one ip few collections have shared and some have a replica, anything goes into recovery may be hard to restart/manage it.

If you can suggest any better way to manage this or overcome such a scenario please suggest.

Regards,
Vishal
________________________________
From: Erick Erickson <er...@gmail.com>
Sent: Friday, January 3, 2020 8:39 PM
To: solr-user@lucene.apache.org <so...@lucene.apache.org>
Subject: Re: Solr 8.3

Well, you can�t do what you want. The Admin UI is
intended as a way for new users to get
started, it was never intended to support all of the
possible options.

Look at the documentation for the Collections
CREATE API, for instance:
https://lucene.apache.org/solr/guide/8_1/collections-api.html

In particular createNodeSet, and createNodeSet.shuffle. If
you want to control absolutely everything, the special
value EMPTY for createNodeSet won�t create any replicas
and you can place each one individually with ADDREPLICA. Of
course you can script this if you need automation.

What you haven�t explained is _why_ you want to do this. Very
often taking this kind of control is unnecessary and a distraction.
That said, when it _is_ necessary you need to use the Collections
API rather than the admin UI.


Best,
Erick


> On Jan 3, 2020, at 4:53 AM, vishal patel <vi...@outlook.com> wrote:
>
> Thanks for the reply. Actually, I don't want to change the IP of the replica but I want to create a collection on a specific shard IP.
> As per my production server configuration, we consider 10.38.33.28 is shard1, 10.38.33.30 is shard2,  10.38.33.31 is replica of shard1 and 10.38.33.29 is replica of shard2.
> We need to create all new collections the same as above.
>
>
> When I create a collection(documents) using the admin panel. It created like
> shard1 10.38.33.30
>       replica1 10.38.33.31
> shard2 10.38.33.28
>       replica2 10.38.33.29
>
> Actually we want like this
> shard1 10.38.33.28
>       replica1 10.38.33.31
> shard2 10.38.33.30
>       replica2 10.38.33.29
>
> Regards,
> Vishal
> ________________________________
> From: Sankar Panda <pa...@gmail.com>
> Sent: Friday, January 3, 2020 12:36 PM
> To: solr-user@lucene.apache.org <so...@lucene.apache.org>
> Subject: Re: Solr 8.3
>
> Hi Vishal,
>
> You can .go to the collection in admin console.mannually changed the ip address as you want.Remove the replica and add it as per your requirements.This option provides by the solr cloud.
> Thanks
> Sankar panda
>
> On Fri, Jan 3, 2020, 11:33 vishal patel <vi...@outlook.com>> wrote:
> I do not want to change the IP of the existing replica. I want to fix the IP for the first time creating a collection.
>
> I have 4 machines. my IP of each machine is below
> machine1 10.38.33.28
> machine2 10.38.33.29
> machine3 10.38.33.30
> machine4 10.38.33.31
>
> I have created solr instance on each machine. when I am creating a first collection(documents) using admin panel my structure becomes like this
> shard1 10.38.33.30
>       replica1 10.38.33.31
> shard2 10.38.33.28
>       replica2 10.38.33.29
>
> When creating a second collection(forms), my structure becomes like this
> shard1 10.38.33.28
>       replica1 10.38.33.30
> shard2 10.38.33.29
>       replica2 10.38.33.31
>
> I have attached a screenshot. [https://ibb.co/Yb2TpVX]
>
> Randomly IP assigned to shard or replica when creating collection but I want to make shard1 on 10.38.33.28, replica1 on 10.38.33.31, shard2 on 10.38.33.30 and replica2 on 10.38.33.31 when first time creating a collection using admin panel.
>
> Can I Fix the IP to shard OR replica when creating a new [cid:4c560b03-a18d-4bc1-b592-6b2f8103f1ae] collection?
>
> Regards,
> Vishal
>
>
> ________________________________
> From: Erick Erickson <er...@gmail.com>>
> Sent: Thursday, January 2, 2020 7:40 PM
> To: solr-user@lucene.apache.org<ma...@lucene.apache.org> <so...@lucene.apache.org>>
> Subject: Re: Solr 8.3
>
> No, you cannot change the IP of an existing replica. Either do as Sankar mentioned when you first create the collection or use the MOVREPLICA collections API command.
>
> MOVEREPLICA has existed for quite a long time, but if it�s not available, you can do the same with the ADDREPLICA command to add a replica to a specific node, wait for the replica to become fully active, then use DELETEREPLICA on the one you no longer want.
>
> Best,
> Erick
>
>> On Jan 2, 2020, at 8:10 AM, Sankar Panda <pa...@gmail.com>> wrote:
>>
>> Hi Vishal,
>> You can create a empty nodeset and manually configure in the collection as
>> desired in the admin page
>> Thanks
>> Sankar Panda
>>
>> On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>>
>> wrote:
>>
>>> My created collection in solr cloud below
>>>
>>> 10.38.33.24 is shard and its replica is 10.38.33.27.
>>> 10.38.33.227 is shard and its replica is 10.38.33.219.
>>>
>>> I want to create a new collection on the Same. can not change the shard IP
>>> for the new collection. How can I?
>>>
>>>
>>> ------------------------------
>>> *From:* sudhir kumar <go...@gmail.com>>
>>> *Sent:* Thursday, January 2, 2020 2:01 PM
>>> *To:* solr-user@lucene.apache.org<ma...@lucene.apache.org> <so...@lucene.apache.org>>
>>> *Subject:* Re: Solr 8.3
>>>
>>> sample url to create collection:
>>>
>>>
>>> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
>>> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
>>> &collection.configName=collectionconfig
>>>
>>> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>>
>>> wrote:
>>>
>>>> Hey Vishal,
>>>>
>>>> You can use createNodeSet property while creating collection which will
>>>> allows you to create shards on specified IP.
>>>>
>>>> /admin/collections?action=CREATE&name=*name*&numShards=*number*
>>>> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
>>>> *nodelist*&collection.configName=*configname*
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Sudhir
>>>>
>>>>
>>>> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
>>> vishalpatel200928@outlook.com<ma...@outlook.com>>
>>>> wrote:
>>>>
>>>>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>>>>> assign a shard or replica to any IP.
>>>>> I want to make the specific shard or replica to solr instance at the
>>> time
>>>>> of creating a collection. Can I?
>>>>>
>>>>> Regards,
>>>>> Vishal
>>>>>
>>>>
>>>
>


Re: Solr 8.3

Posted by Erick Erickson <er...@gmail.com>.
Well, you can’t do what you want. The Admin UI is
intended as a way for new users to get 
started, it was never intended to support all of the
possible options.

Look at the documentation for the Collections
CREATE API, for instance:
https://lucene.apache.org/solr/guide/8_1/collections-api.html

In particular createNodeSet, and createNodeSet.shuffle. If
you want to control absolutely everything, the special
value EMPTY for createNodeSet won’t create any replicas
and you can place each one individually with ADDREPLICA. Of
course you can script this if you need automation.

What you haven’t explained is _why_ you want to do this. Very
often taking this kind of control is unnecessary and a distraction.
That said, when it _is_ necessary you need to use the Collections
API rather than the admin UI.


Best,
Erick


> On Jan 3, 2020, at 4:53 AM, vishal patel <vi...@outlook.com> wrote:
> 
> Thanks for the reply. Actually, I don't want to change the IP of the replica but I want to create a collection on a specific shard IP.
> As per my production server configuration, we consider 10.38.33.28 is shard1, 10.38.33.30 is shard2,  10.38.33.31 is replica of shard1 and 10.38.33.29 is replica of shard2.
> We need to create all new collections the same as above.
> 
> 
> When I create a collection(documents) using the admin panel. It created like
> shard1 10.38.33.30
>       replica1 10.38.33.31
> shard2 10.38.33.28
>       replica2 10.38.33.29
> 
> Actually we want like this
> shard1 10.38.33.28
>       replica1 10.38.33.31
> shard2 10.38.33.30
>       replica2 10.38.33.29
> 
> Regards,
> Vishal
> ________________________________
> From: Sankar Panda <pa...@gmail.com>
> Sent: Friday, January 3, 2020 12:36 PM
> To: solr-user@lucene.apache.org <so...@lucene.apache.org>
> Subject: Re: Solr 8.3
> 
> Hi Vishal,
> 
> You can .go to the collection in admin console.mannually changed the ip address as you want.Remove the replica and add it as per your requirements.This option provides by the solr cloud.
> Thanks
> Sankar panda
> 
> On Fri, Jan 3, 2020, 11:33 vishal patel <vi...@outlook.com>> wrote:
> I do not want to change the IP of the existing replica. I want to fix the IP for the first time creating a collection.
> 
> I have 4 machines. my IP of each machine is below
> machine1 10.38.33.28
> machine2 10.38.33.29
> machine3 10.38.33.30
> machine4 10.38.33.31
> 
> I have created solr instance on each machine. when I am creating a first collection(documents) using admin panel my structure becomes like this
> shard1 10.38.33.30
>       replica1 10.38.33.31
> shard2 10.38.33.28
>       replica2 10.38.33.29
> 
> When creating a second collection(forms), my structure becomes like this
> shard1 10.38.33.28
>       replica1 10.38.33.30
> shard2 10.38.33.29
>       replica2 10.38.33.31
> 
> I have attached a screenshot. [https://ibb.co/Yb2TpVX]
> 
> Randomly IP assigned to shard or replica when creating collection but I want to make shard1 on 10.38.33.28, replica1 on 10.38.33.31, shard2 on 10.38.33.30 and replica2 on 10.38.33.31 when first time creating a collection using admin panel.
> 
> Can I Fix the IP to shard OR replica when creating a new [cid:4c560b03-a18d-4bc1-b592-6b2f8103f1ae] collection?
> 
> Regards,
> Vishal
> 
> 
> ________________________________
> From: Erick Erickson <er...@gmail.com>>
> Sent: Thursday, January 2, 2020 7:40 PM
> To: solr-user@lucene.apache.org<ma...@lucene.apache.org> <so...@lucene.apache.org>>
> Subject: Re: Solr 8.3
> 
> No, you cannot change the IP of an existing replica. Either do as Sankar mentioned when you first create the collection or use the MOVREPLICA collections API command.
> 
> MOVEREPLICA has existed for quite a long time, but if it’s not available, you can do the same with the ADDREPLICA command to add a replica to a specific node, wait for the replica to become fully active, then use DELETEREPLICA on the one you no longer want.
> 
> Best,
> Erick
> 
>> On Jan 2, 2020, at 8:10 AM, Sankar Panda <pa...@gmail.com>> wrote:
>> 
>> Hi Vishal,
>> You can create a empty nodeset and manually configure in the collection as
>> desired in the admin page
>> Thanks
>> Sankar Panda
>> 
>> On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>>
>> wrote:
>> 
>>> My created collection in solr cloud below
>>> 
>>> 10.38.33.24 is shard and its replica is 10.38.33.27.
>>> 10.38.33.227 is shard and its replica is 10.38.33.219.
>>> 
>>> I want to create a new collection on the Same. can not change the shard IP
>>> for the new collection. How can I?
>>> 
>>> 
>>> ------------------------------
>>> *From:* sudhir kumar <go...@gmail.com>>
>>> *Sent:* Thursday, January 2, 2020 2:01 PM
>>> *To:* solr-user@lucene.apache.org<ma...@lucene.apache.org> <so...@lucene.apache.org>>
>>> *Subject:* Re: Solr 8.3
>>> 
>>> sample url to create collection:
>>> 
>>> 
>>> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
>>> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
>>> &collection.configName=collectionconfig
>>> 
>>> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>>
>>> wrote:
>>> 
>>>> Hey Vishal,
>>>> 
>>>> You can use createNodeSet property while creating collection which will
>>>> allows you to create shards on specified IP.
>>>> 
>>>> /admin/collections?action=CREATE&name=*name*&numShards=*number*
>>>> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
>>>> *nodelist*&collection.configName=*configname*
>>>> 
>>>> 
>>>> Thanks,
>>>> 
>>>> Sudhir
>>>> 
>>>> 
>>>> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
>>> vishalpatel200928@outlook.com<ma...@outlook.com>>
>>>> wrote:
>>>> 
>>>>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>>>>> assign a shard or replica to any IP.
>>>>> I want to make the specific shard or replica to solr instance at the
>>> time
>>>>> of creating a collection. Can I?
>>>>> 
>>>>> Regards,
>>>>> Vishal
>>>>> 
>>>> 
>>> 
> 


Re: Solr 8.3

Posted by vishal patel <vi...@outlook.com>.
Thanks for the reply. Actually, I don't want to change the IP of the replica but I want to create a collection on a specific shard IP.
As per my production server configuration, we consider 10.38.33.28 is shard1, 10.38.33.30 is shard2,  10.38.33.31 is replica of shard1 and 10.38.33.29 is replica of shard2.
We need to create all new collections the same as above.


When I create a collection(documents) using the admin panel. It created like
shard1 10.38.33.30
       replica1 10.38.33.31
shard2 10.38.33.28
       replica2 10.38.33.29

Actually we want like this
shard1 10.38.33.28
       replica1 10.38.33.31
shard2 10.38.33.30
       replica2 10.38.33.29

Regards,
Vishal
________________________________
From: Sankar Panda <pa...@gmail.com>
Sent: Friday, January 3, 2020 12:36 PM
To: solr-user@lucene.apache.org <so...@lucene.apache.org>
Subject: Re: Solr 8.3

Hi Vishal,

You can .go to the collection in admin console.mannually changed the ip address as you want.Remove the replica and add it as per your requirements.This option provides by the solr cloud.
Thanks
Sankar panda

On Fri, Jan 3, 2020, 11:33 vishal patel <vi...@outlook.com>> wrote:
I do not want to change the IP of the existing replica. I want to fix the IP for the first time creating a collection.

I have 4 machines. my IP of each machine is below
machine1 10.38.33.28
machine2 10.38.33.29
machine3 10.38.33.30
machine4 10.38.33.31

I have created solr instance on each machine. when I am creating a first collection(documents) using admin panel my structure becomes like this
shard1 10.38.33.30
       replica1 10.38.33.31
shard2 10.38.33.28
       replica2 10.38.33.29

When creating a second collection(forms), my structure becomes like this
shard1 10.38.33.28
       replica1 10.38.33.30
shard2 10.38.33.29
       replica2 10.38.33.31

I have attached a screenshot. [https://ibb.co/Yb2TpVX]

Randomly IP assigned to shard or replica when creating collection but I want to make shard1 on 10.38.33.28, replica1 on 10.38.33.31, shard2 on 10.38.33.30 and replica2 on 10.38.33.31 when first time creating a collection using admin panel.

Can I Fix the IP to shard OR replica when creating a new [cid:4c560b03-a18d-4bc1-b592-6b2f8103f1ae] collection?

Regards,
Vishal


________________________________
From: Erick Erickson <er...@gmail.com>>
Sent: Thursday, January 2, 2020 7:40 PM
To: solr-user@lucene.apache.org<ma...@lucene.apache.org> <so...@lucene.apache.org>>
Subject: Re: Solr 8.3

No, you cannot change the IP of an existing replica. Either do as Sankar mentioned when you first create the collection or use the MOVREPLICA collections API command.

MOVEREPLICA has existed for quite a long time, but if it’s not available, you can do the same with the ADDREPLICA command to add a replica to a specific node, wait for the replica to become fully active, then use DELETEREPLICA on the one you no longer want.

Best,
Erick

> On Jan 2, 2020, at 8:10 AM, Sankar Panda <pa...@gmail.com>> wrote:
>
> Hi Vishal,
> You can create a empty nodeset and manually configure in the collection as
> desired in the admin page
> Thanks
> Sankar Panda
>
> On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>>
> wrote:
>
>> My created collection in solr cloud below
>>
>> 10.38.33.24 is shard and its replica is 10.38.33.27.
>> 10.38.33.227 is shard and its replica is 10.38.33.219.
>>
>> I want to create a new collection on the Same. can not change the shard IP
>> for the new collection. How can I?
>>
>>
>> ------------------------------
>> *From:* sudhir kumar <go...@gmail.com>>
>> *Sent:* Thursday, January 2, 2020 2:01 PM
>> *To:* solr-user@lucene.apache.org<ma...@lucene.apache.org> <so...@lucene.apache.org>>
>> *Subject:* Re: Solr 8.3
>>
>> sample url to create collection:
>>
>>
>> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
>> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
>> &collection.configName=collectionconfig
>>
>> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>>
>> wrote:
>>
>>> Hey Vishal,
>>>
>>> You can use createNodeSet property while creating collection which will
>>> allows you to create shards on specified IP.
>>>
>>> /admin/collections?action=CREATE&name=*name*&numShards=*number*
>>> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
>>> *nodelist*&collection.configName=*configname*
>>>
>>>
>>> Thanks,
>>>
>>> Sudhir
>>>
>>>
>>> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
>> vishalpatel200928@outlook.com<ma...@outlook.com>>
>>> wrote:
>>>
>>>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>>>> assign a shard or replica to any IP.
>>>> I want to make the specific shard or replica to solr instance at the
>> time
>>>> of creating a collection. Can I?
>>>>
>>>> Regards,
>>>> Vishal
>>>>
>>>
>>


Re: Solr 8.3

Posted by Sankar Panda <pa...@gmail.com>.
Hi Vishal,

You can .go to the collection in admin console.mannually changed the ip
address as you want.Remove the replica and add it as per your
requirements.This option provides by the solr cloud.
Thanks
Sankar panda

On Fri, Jan 3, 2020, 11:33 vishal patel <vi...@outlook.com>
wrote:

> I do not want to change the IP of the existing replica. I want to fix the
> IP for the first time creating a collection.
>
> I have 4 machines. my IP of each machine is below
> machine1 10.38.33.28
> machine2 10.38.33.29
> machine3 10.38.33.30
> machine4 10.38.33.31
>
> I have created solr instance on each machine. when I am creating a first
> collection(documents) using admin panel my structure becomes like this
> shard1 10.38.33.30
>        replica1 10.38.33.31
> shard2 10.38.33.28
>        replica2 10.38.33.29
>
> When creating a second collection(forms), my structure becomes like this
> shard1 10.38.33.28
>        replica1 10.38.33.30
> shard2 10.38.33.29
>        replica2 10.38.33.31
>
> I have attached a screenshot. [https://ibb.co/Yb2TpVX]
>
> Randomly IP assigned to shard or replica when creating collection but I
> want to make shard1 on 10.38.33.28, replica1 on 10.38.33.31, shard2 on
> 10.38.33.30 and replica2 on 10.38.33.31 when first time creating a
> collection using admin panel.
>
> Can I Fix the IP to shard OR replica when creating a new collection?
>
> Regards,
> Vishal
>
>
> ------------------------------
> *From:* Erick Erickson <er...@gmail.com>
> *Sent:* Thursday, January 2, 2020 7:40 PM
> *To:* solr-user@lucene.apache.org <so...@lucene.apache.org>
> *Subject:* Re: Solr 8.3
>
> No, you cannot change the IP of an existing replica. Either do as Sankar
> mentioned when you first create the collection or use the MOVREPLICA
> collections API command.
>
> MOVEREPLICA has existed for quite a long time, but if it’s not available,
> you can do the same with the ADDREPLICA command to add a replica to a
> specific node, wait for the replica to become fully active, then use
> DELETEREPLICA on the one you no longer want.
>
> Best,
> Erick
>
> > On Jan 2, 2020, at 8:10 AM, Sankar Panda <pa...@gmail.com> wrote:
> >
> > Hi Vishal,
> > You can create a empty nodeset and manually configure in the collection
> as
> > desired in the admin page
> > Thanks
> > Sankar Panda
> >
> > On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>
> > wrote:
> >
> >> My created collection in solr cloud below
> >>
> >> 10.38.33.24 is shard and its replica is 10.38.33.27.
> >> 10.38.33.227 is shard and its replica is 10.38.33.219.
> >>
> >> I want to create a new collection on the Same. can not change the shard
> IP
> >> for the new collection. How can I?
> >>
> >>
> >> ------------------------------
> >> *From:* sudhir kumar <go...@gmail.com>
> >> *Sent:* Thursday, January 2, 2020 2:01 PM
> >> *To:* solr-user@lucene.apache.org <so...@lucene.apache.org>
> >> *Subject:* Re: Solr 8.3
> >>
> >> sample url to create collection:
> >>
> >>
> >>
> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
> >> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
> >> &collection.configName=collectionconfig
> >>
> >> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>
> >> wrote:
> >>
> >>> Hey Vishal,
> >>>
> >>> You can use createNodeSet property while creating collection which will
> >>> allows you to create shards on specified IP.
> >>>
> >>> /admin/collections?action=CREATE&name=*name*&numShards=*number*
> >>>
> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
> >>> *nodelist*&collection.configName=*configname*
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Sudhir
> >>>
> >>>
> >>> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
> >> vishalpatel200928@outlook.com>
> >>> wrote:
> >>>
> >>>> When I am creating 2 shards and 2 replicas using admin panel,
> automatic
> >>>> assign a shard or replica to any IP.
> >>>> I want to make the specific shard or replica to solr instance at the
> >> time
> >>>> of creating a collection. Can I?
> >>>>
> >>>> Regards,
> >>>> Vishal
> >>>>
> >>>
> >>
>
>

Re: Solr 8.3

Posted by vishal patel <vi...@outlook.com>.
I do not want to change the IP of the existing replica. I want to fix the IP for the first time creating a collection.

I have 4 machines. my IP of each machine is below
machine1 10.38.33.28
machine2 10.38.33.29
machine3 10.38.33.30
machine4 10.38.33.31

I have created solr instance on each machine. when I am creating a first collection(documents) using admin panel my structure becomes like this
shard1 10.38.33.30
       replica1 10.38.33.31
shard2 10.38.33.28
       replica2 10.38.33.29

When creating a second collection(forms), my structure becomes like this
shard1 10.38.33.28
       replica1 10.38.33.30
shard2 10.38.33.29
       replica2 10.38.33.31

I have attached a screenshot. [https://ibb.co/Yb2TpVX]

Randomly IP assigned to shard or replica when creating collection but I want to make shard1 on 10.38.33.28, replica1 on 10.38.33.31, shard2 on 10.38.33.30 and replica2 on 10.38.33.31 when first time creating a collection using admin panel.

Can I Fix the IP to shard OR replica when creating a new [cid:4c560b03-a18d-4bc1-b592-6b2f8103f1ae] collection?

Regards,
Vishal


________________________________
From: Erick Erickson <er...@gmail.com>
Sent: Thursday, January 2, 2020 7:40 PM
To: solr-user@lucene.apache.org <so...@lucene.apache.org>
Subject: Re: Solr 8.3

No, you cannot change the IP of an existing replica. Either do as Sankar mentioned when you first create the collection or use the MOVREPLICA collections API command.

MOVEREPLICA has existed for quite a long time, but if it’s not available, you can do the same with the ADDREPLICA command to add a replica to a specific node, wait for the replica to become fully active, then use DELETEREPLICA on the one you no longer want.

Best,
Erick

> On Jan 2, 2020, at 8:10 AM, Sankar Panda <pa...@gmail.com> wrote:
>
> Hi Vishal,
> You can create a empty nodeset and manually configure in the collection as
> desired in the admin page
> Thanks
> Sankar Panda
>
> On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>
> wrote:
>
>> My created collection in solr cloud below
>>
>> 10.38.33.24 is shard and its replica is 10.38.33.27.
>> 10.38.33.227 is shard and its replica is 10.38.33.219.
>>
>> I want to create a new collection on the Same. can not change the shard IP
>> for the new collection. How can I?
>>
>>
>> ------------------------------
>> *From:* sudhir kumar <go...@gmail.com>
>> *Sent:* Thursday, January 2, 2020 2:01 PM
>> *To:* solr-user@lucene.apache.org <so...@lucene.apache.org>
>> *Subject:* Re: Solr 8.3
>>
>> sample url to create collection:
>>
>>
>> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
>> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
>> &collection.configName=collectionconfig
>>
>> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>
>> wrote:
>>
>>> Hey Vishal,
>>>
>>> You can use createNodeSet property while creating collection which will
>>> allows you to create shards on specified IP.
>>>
>>> /admin/collections?action=CREATE&name=*name*&numShards=*number*
>>> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
>>> *nodelist*&collection.configName=*configname*
>>>
>>>
>>> Thanks,
>>>
>>> Sudhir
>>>
>>>
>>> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
>> vishalpatel200928@outlook.com>
>>> wrote:
>>>
>>>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>>>> assign a shard or replica to any IP.
>>>> I want to make the specific shard or replica to solr instance at the
>> time
>>>> of creating a collection. Can I?
>>>>
>>>> Regards,
>>>> Vishal
>>>>
>>>
>>


Re: Solr 8.3

Posted by Erick Erickson <er...@gmail.com>.
No, you cannot change the IP of an existing replica. Either do as Sankar mentioned when you first create the collection or use the MOVREPLICA collections API command.

MOVEREPLICA has existed for quite a long time, but if it’s not available, you can do the same with the ADDREPLICA command to add a replica to a specific node, wait for the replica to become fully active, then use DELETEREPLICA on the one you no longer want.

Best,
Erick

> On Jan 2, 2020, at 8:10 AM, Sankar Panda <pa...@gmail.com> wrote:
> 
> Hi Vishal,
> You can create a empty nodeset and manually configure in the collection as
> desired in the admin page
> Thanks
> Sankar Panda
> 
> On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>
> wrote:
> 
>> My created collection in solr cloud below
>> 
>> 10.38.33.24 is shard and its replica is 10.38.33.27.
>> 10.38.33.227 is shard and its replica is 10.38.33.219.
>> 
>> I want to create a new collection on the Same. can not change the shard IP
>> for the new collection. How can I?
>> 
>> 
>> ------------------------------
>> *From:* sudhir kumar <go...@gmail.com>
>> *Sent:* Thursday, January 2, 2020 2:01 PM
>> *To:* solr-user@lucene.apache.org <so...@lucene.apache.org>
>> *Subject:* Re: Solr 8.3
>> 
>> sample url to create collection:
>> 
>> 
>> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
>> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
>> &collection.configName=collectionconfig
>> 
>> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>
>> wrote:
>> 
>>> Hey Vishal,
>>> 
>>> You can use createNodeSet property while creating collection which will
>>> allows you to create shards on specified IP.
>>> 
>>> /admin/collections?action=CREATE&name=*name*&numShards=*number*
>>> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
>>> *nodelist*&collection.configName=*configname*
>>> 
>>> 
>>> Thanks,
>>> 
>>> Sudhir
>>> 
>>> 
>>> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
>> vishalpatel200928@outlook.com>
>>> wrote:
>>> 
>>>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>>>> assign a shard or replica to any IP.
>>>> I want to make the specific shard or replica to solr instance at the
>> time
>>>> of creating a collection. Can I?
>>>> 
>>>> Regards,
>>>> Vishal
>>>> 
>>> 
>> 


Re: Solr 8.3

Posted by Sankar Panda <pa...@gmail.com>.
Hi Vishal,
You can create a empty nodeset and manually configure in the collection as
desired in the admin page
Thanks
Sankar Panda

On Thu, Jan 2, 2020, 14:36 vishal patel <vi...@outlook.com>
wrote:

> My created collection in solr cloud below
>
> 10.38.33.24 is shard and its replica is 10.38.33.27.
> 10.38.33.227 is shard and its replica is 10.38.33.219.
>
> I want to create a new collection on the Same. can not change the shard IP
> for the new collection. How can I?
>
>
> ------------------------------
> *From:* sudhir kumar <go...@gmail.com>
> *Sent:* Thursday, January 2, 2020 2:01 PM
> *To:* solr-user@lucene.apache.org <so...@lucene.apache.org>
> *Subject:* Re: Solr 8.3
>
> sample url to create collection:
>
>
> http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
> host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
> &collection.configName=collectionconfig
>
> On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com>
> wrote:
>
> > Hey Vishal,
> >
> > You can use createNodeSet property while creating collection which will
> > allows you to create shards on specified IP.
> >
> > /admin/collections?action=CREATE&name=*name*&numShards=*number*
> > &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
> > *nodelist*&collection.configName=*configname*
> >
> >
> > Thanks,
> >
> > Sudhir
> >
> >
> > On Thu, Jan 2, 2020 at 1:49 PM vishal patel <
> vishalpatel200928@outlook.com>
> > wrote:
> >
> >> When I am creating 2 shards and 2 replicas using admin panel, automatic
> >> assign a shard or replica to any IP.
> >> I want to make the specific shard or replica to solr instance at the
> time
> >> of creating a collection. Can I?
> >>
> >> Regards,
> >> Vishal
> >>
> >
>

Re: Solr 8.3

Posted by vishal patel <vi...@outlook.com>.
My created collection in solr cloud below
[cid:4461af25-67be-4647-b9e5-766d3e2a2602]
10.38.33.24 is shard and its replica is 10.38.33.27.
10.38.33.227 is shard and its replica is 10.38.33.219.

I want to create a new collection on the Same. can not change the shard IP for the new collection. How can I?


________________________________
From: sudhir kumar <go...@gmail.com>
Sent: Thursday, January 2, 2020 2:01 PM
To: solr-user@lucene.apache.org <so...@lucene.apache.org>
Subject: Re: Solr 8.3

sample url to create collection:

http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
&collection.configName=collectionconfig

On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com> wrote:

> Hey Vishal,
>
> You can use createNodeSet property while creating collection which will
> allows you to create shards on specified IP.
>
> /admin/collections?action=CREATE&name=*name*&numShards=*number*
> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
> *nodelist*&collection.configName=*configname*
>
>
> Thanks,
>
> Sudhir
>
>
> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <vi...@outlook.com>
> wrote:
>
>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>> assign a shard or replica to any IP.
>> I want to make the specific shard or replica to solr instance at the time
>> of creating a collection. Can I?
>>
>> Regards,
>> Vishal
>>
>

Re: Solr 8.3

Posted by sudhir kumar <go...@gmail.com>.
sample url to create collection:

http//host:8080/solr/admin/collections?action=CREATE&name=collectionname&numShards=2&replicationFactor=3&maxShardsPerNode=2&createNodeSet=
host:8080_solr,host:8080_solr,host:8080_solr,host:8080_solr
&collection.configName=collectionconfig

On Thu, Jan 2, 2020 at 1:56 PM sudhir kumar <go...@gmail.com> wrote:

> Hey Vishal,
>
> You can use createNodeSet property while creating collection which will
> allows you to create shards on specified IP.
>
> /admin/collections?action=CREATE&name=*name*&numShards=*number*
> &replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
> *nodelist*&collection.configName=*configname*
>
>
> Thanks,
>
> Sudhir
>
>
> On Thu, Jan 2, 2020 at 1:49 PM vishal patel <vi...@outlook.com>
> wrote:
>
>> When I am creating 2 shards and 2 replicas using admin panel, automatic
>> assign a shard or replica to any IP.
>> I want to make the specific shard or replica to solr instance at the time
>> of creating a collection. Can I?
>>
>> Regards,
>> Vishal
>>
>

Re: Solr 8.3

Posted by sudhir kumar <go...@gmail.com>.
Hey Vishal,

You can use createNodeSet property while creating collection which will
allows you to create shards on specified IP.

/admin/collections?action=CREATE&name=*name*&numShards=*number*
&replicationFactor=*number*&*maxShardsPerNode*=*number*&*createNodeSet*=
*nodelist*&collection.configName=*configname*


Thanks,

Sudhir


On Thu, Jan 2, 2020 at 1:49 PM vishal patel <vi...@outlook.com>
wrote:

> When I am creating 2 shards and 2 replicas using admin panel, automatic
> assign a shard or replica to any IP.
> I want to make the specific shard or replica to solr instance at the time
> of creating a collection. Can I?
>
> Regards,
> Vishal
>