Jeez, I should have posted this on user@ mailing list, sorry about that. On Mon, Sep 17, 2018 at 4:35 PM, Edward Ribeiro <edward.ribe...@gmail.com> wrote:
> When using the CLI to create a collection on a single cloud node with the > following command: > > $ bin/solr create -c test -shards 1 -replicationFactor 1 > > It creates the collection with maxShardsPerNode as -1 as seen here: > https://github.com/apache/lucene-solr/blob/c97f27b06c1d7c250e9596a9bc7bf5 > ca11ef6ad3/solr/core/src/java/org/apache/solr/util/SolrCLI. > java#L1530-L1534 > > As we can see, it even allows the setting of maxShardsPerNode as a > parameter, but according to 7.4 documentation the default value would be 1 > instead of -1 (see https://lucene.apache.org/solr/guide/7_4/collections- > api.html ). If I create the collection directly via HTTP request > > curl -X POST 'http://localhost:8983/solr/admin/collections?action= > CREATE&name=test2&numShards=1&replicationFactor=1' > > It creates the collection with the default maxShardsPerNode of 1. > > It seems that the fix is trivial (either code or docs), but I would like > to know if this is really a bug or not, that is, should I provide a fix or > leave it as-is? > > PS: As a bit of context, I was bited by this when demo-ing Solr > backup/restore capabilities and it refused to recover a collection with > maxShardsPerNode == -1. > > Best regards, > Edward >