lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum Gupta <ans...@anshumgupta.net>
Subject Re: Create collection on all nodes using the Collection API
Date Thu, 11 Aug 2016 17:47:37 GMT
Hi Alexandre,

You can you the CLUSTERSTATUS Collections API (
https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api18)
to get a list of live nodes.

-Anshum

On Thu, Aug 11, 2016 at 10:16 AM Alexandre Drouin <
alexandre.drouin@orckestra.com> wrote:

> Hi,
>
> What would be the best/easiest way to create a collection (only one shard)
> using the Collection API and have a replica created on all live nodes?
>
> Using the 'create collection' API, I can use the 'replicationFactor'
> parameter and specify the number of replica I want for my collection.  So
> if I have 3 lives nodes I can say 'replicationFactor=3' and my collection
> will have a replica on all lives nodes.  However I do not want to
> 'hardcode' my number of live nodes for obvious reasons, so because of that
> I have the following questions:
>
> 1) Is there a way to create a collection (only one shard) and having a
> replica of the shard on all live nodes?
>
> 2) Assuming #1 is not possible, is it possible to have the list of live
> nodes ?  If I can have the list of live nodes I could detect the number
> required for the replicationFactor parameter.
>
> Thanks
>
> Alexandre Drouin
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message