Unique indexes can now be created in existing collections with data in the API for MongoDB.

Source