0
我只是無法創建所需的索引。我列出與無法使用Spring MongoTemplate在Azure DocumentDB中創建索引
System.out.println(mongo.getCollection("User").getIndexInfo());
和仍然存在的索引只得到
[{ "v" : 1 , "key" : { "_id" : 1} , "name" : "_id_1" , "ns" : "devtest01.User"}]
我試圖
mongo.getCollection("User").createIndex("syncTime");
和
Index indexDefinition = new Index("syncTime", Direction.ASC);
mongo.indexOps("User").ensureIndex(indexDefinition);
結果還是一樣...