CreateShardKeyForCosmos does not create sharded collection
tomhreb opened this issue · 2 comments
tomhreb commented
Hello,
I think that the method GetCollection
->
is missing specification of shard key as for CosmsoDB as per the documentation / it has to be created differently for CosmosDB.
Creating a collection via command below creates the collection really sharded, at least according to Azure Monitor.
db.createCollection(<collectionName>, {
"shardKey": "_id",
"indexes": [{key: {_id: 1}}}]
});
SebastianStehle commented
Could be, not a CosmosDB user. PRs are welcome ;)