Cannot create index in Azure DocumentDb using Mongodb protocol

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?

+5
source share
2 answers

By default, DocumentDB with the API for MongoDB automatically indexes all properties to reduce installation complexity. We plan to release creating / updating indexes in future releases of the pair.

+5
source

I think that indexes are not currently supported (02/27/2017). Hopefully future releases will support them.

+1
source

Source: https://habr.com/ru/post/1264766/