I would like to use partial indexes as noted in the documentation for the MongoDB API on Cosmos DB, however in doing so I'm greeted with the following message:
"partial indexes support is currently not enabled, please reach out to Cosmos DB support to enable this feature."
I had 2 options with support - pay $29 or post here - hoping this gets me to the solution.
This is the command I was issuing:
db.communities.createIndex(
{ handle: 1 },
{ unique: true, partialFilterExpression: { handle: { $exists:true } } }
)
Documentation Link:
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/mongodb-indexing#unique-partial-indexes
I'm using v4.2 of the MongoDB API