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

sarthak 0 Reputation points

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: that collection should be empty.

But here it states that feature is in preview:

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

    Hi ,

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

    0 comments No comments