lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Solr 8.3
Date Fri, 03 Jan 2020 15:09:02 GMT
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 <vishalpatel200928@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 <panda.sankar@gmail.com>
> Sent: Friday, January 3, 2020 12:36 PM
> To: solr-user@lucene.apache.org <solr-user@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 <vishalpatel200928@outlook.com<mailto:vishalpatel200928@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 <erickerickson@gmail.com<mailto:erickerickson@gmail.com>>
> Sent: Thursday, January 2, 2020 7:40 PM
> To: solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org> <solr-user@lucene.apache.org<mailto:solr-user@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 <panda.sankar@gmail.com<mailto:panda.sankar@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 <vishalpatel200928@outlook.com<mailto:vishalpatel200928@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 <gogikarsudhir@gmail.com<mailto:gogikarsudhir@gmail.com>>
>>> *Sent:* Thursday, January 2, 2020 2:01 PM
>>> *To:* solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org> <solr-user@lucene.apache.org<mailto:solr-user@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 <gogikarsudhir@gmail.com<mailto:gogikarsudhir@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<mailto: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
>>>>> 
>>>> 
>>> 
> 


Mime
View raw message