How to access the feature for dynamic Unique indexing in cosmos Db for mongoDb service

sarthak 0 Reputation points
2023-11-06T20:42:57.1233333+00:00

I am getting an error when migrating from the MongoDB Atlas to Cosmos DB for MongoDB service in my spring boot application which have large migration sequence written.
Error: Command failed with error 67 (CannotCreateIndex): 'Cannot create unique index when collection contains documents'
Its written as a limitation here: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/indexing#limitations-1 that collection should be empty.

But here it states that feature is in preview: https://azure.microsoft.com/en-us/updates/public-preview-azure-cosmos-db-api-for-mongodb-unique-index-reindexing/

How can I access this feature as I am in urgent need for this one.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,504 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sajeetharan 1,956 Reputation points Microsoft Employee
    2023-11-09T13:33:51.91+00:00

    Hi ,

    The above feature is in private preview, you can raise a support request to get it enabled.

    0 comments No comments