Reputation: 9427
In Azure Cosmos I have selected partition key as City. But it is possible that this key can have a null also. In such a case. Will all the City with null be in one partition.
How will the partition be distributed in this case?
Upvotes: 2
Views: 2734
Reputation: 222720
You can create. Null, Undefined, and empty string are treated as different values in Cosmos DB.
new RequestOptions { PartitionKey = new PartitionKey(null) }
As 4c74356b41
mentioned There will be a separate partition and these values will go under that.
Upvotes: 1
Reputation: 72211
Fairly certain there is a hidden partition and all the documents without a partition key would go to that partition.
I recall reading this somewhere on SO answers\comments.
Upvotes: 1