Re: Distributing Collections across Shards

2016-03-30 Thread Salman Ansari
Thanks Erick for the help. Appreciate it.

Regards,
Salman

On Wed, Mar 30, 2016 at 7:29 AM, Erick Erickson 
wrote:

> Absolutely. You haven't said which version of Solr you're using,
> but there are several possibilities:
> 1> create the collection with replicationFactor=1, then use the
> ADDREPLICA command to specify exactly what node the  replicas
> for each shard are created on with the 'node' parameter.
> 2> For recent versions of Solr, you can create a collection with _no_
> replicas and then ADDREPLICA as you choose.
>
> Best,
> Erick
>
> On Tue, Mar 29, 2016 at 5:10 AM, Salman Ansari 
> wrote:
> > Hi,
> >
> > I believe the default behavior of creating collections distributed across
> > shards through the following command
> >
> > http://
> >
> [solrlocation]:8983/solr/admin/collections?action=CREATE=[collection_name]=2=2=2=[configuration_name]
> >
> > is that Solr will create the collection as follows
> >
> > *shard1: *leader in server1 and replica in server2
> > *shard2:* leader in server2 and replica in server1
> >
> > However, I have seen cases when running the above command that it creates
> > both the leader and replica on the same server.
> >
> > Wondering if there is a way to control this behavior (I mean control
> where
> > the leader and the replica of each shard will reside)?
> >
> > Regards,
> > Salman
>


Re: Distributing Collections across Shards

2016-03-29 Thread Erick Erickson
Absolutely. You haven't said which version of Solr you're using,
but there are several possibilities:
1> create the collection with replicationFactor=1, then use the
ADDREPLICA command to specify exactly what node the  replicas
for each shard are created on with the 'node' parameter.
2> For recent versions of Solr, you can create a collection with _no_
replicas and then ADDREPLICA as you choose.

Best,
Erick

On Tue, Mar 29, 2016 at 5:10 AM, Salman Ansari  wrote:
> Hi,
>
> I believe the default behavior of creating collections distributed across
> shards through the following command
>
> http://
> [solrlocation]:8983/solr/admin/collections?action=CREATE=[collection_name]=2=2=2=[configuration_name]
>
> is that Solr will create the collection as follows
>
> *shard1: *leader in server1 and replica in server2
> *shard2:* leader in server2 and replica in server1
>
> However, I have seen cases when running the above command that it creates
> both the leader and replica on the same server.
>
> Wondering if there is a way to control this behavior (I mean control where
> the leader and the replica of each shard will reside)?
>
> Regards,
> Salman


Distributing Collections across Shards

2016-03-29 Thread Salman Ansari
Hi,

I believe the default behavior of creating collections distributed across
shards through the following command

http://
[solrlocation]:8983/solr/admin/collections?action=CREATE=[collection_name]=2=2=2=[configuration_name]

is that Solr will create the collection as follows

*shard1: *leader in server1 and replica in server2
*shard2:* leader in server2 and replica in server1

However, I have seen cases when running the above command that it creates
both the leader and replica on the same server.

Wondering if there is a way to control this behavior (I mean control where
the leader and the replica of each shard will reside)?

Regards,
Salman