Now I know that a unique index is not supported in DocumentDb, but why can't I create a normal index using createIndex ()? In the shell of mango:
> db.product.createIndex({itemId:1}) { "_t" : "OKMongoResponse", "ok" : 1 }
but the collection seems unchange:
> db.product.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_1", "ns" : "admin.product" } ]
I also found the Mongodb API compatibility slide here . He told us that we can use the createIndex function in mongodb to create an imperfect index. Can anyone tell me why?
source share