In response to question 4: "Unique and compound indexes do not support nested paths.", the Azure Cosmos DB Team has said recently (March 9th, 2021) that this is a feature that is currently being worked on. There should be an update once they enter preview or GA:
Spring-Data annotations on CosmosDB with MongoDB API don't work
Tufekcic, Dino
16
Reputation points
Indexing annotations in my Spring Boot application don't work on my Azure CosmosDB with MongoDB API. Using the same annotations directly with a local instance of MongoDB works as expected. This issue was referenced in this post https://learn.microsoft.com/en-us/answers/questions/258032/the-index-path-corresponding-to-the-specified-orde.html but no feedback was offered from MS.
Could someone from MS please respond to the following questions?
- Is this is an issue with CosmosDB with Mongo API?
- What is the expected time frame for a fix?
- Are there any work-arounds other than manually creating indexes?
- Possibly unrelated, but creating a composite index from a mongo shell on a CosmosDB instance fails with an 'unsupported' error
globaldb:PRIMARY> db.feed.createIndex({"_id.reportDate": -1, "_id.ownerUpn": 1}) { "ok" : 0, "errmsg" : "Unique and compound indexes do not support nested paths.", "code" : 115, "codeName" : "CommandNotSupported" }
Is this something that will be supported soon? It works with native MongoDB
Thanks
Dino
1 answer
Sort by: Most helpful
-
kobulloc-MSFT 26,336 Reputation points Microsoft Employee
2021-04-21T02:55:12.607+00:00