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

Reply via email to