az cosmosdb mongodb collection create -g -a -d -n --idx @indexes.json
Running command in this format is giving error: Deployment failed. Correlation ID: ..... Index definition does not contains '_id' index specification.
My indexes.json file content is as shown underneath:
[
{ "_id": 1 },
{
"key":
{"keys":["$**"]},
"options":{"Wildcard":true}
}
]
Try using this json instead.
"indexes": [
{
"key": {
"keys": [
"_id"
]
}
},
{
"key": {
"keys": [
"$**"
]
}
}
]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.