I tried to create a view via Robo3T. The command executes successfully, but the view is always empty, no matter how I specify the aggregation pipeline for the view. Example:
db.createView("testView","originCollection", [{
$project : {
_id: 1
}
}])
Does CosmosDB even support views for MongoDB?
Edit: As Kevin Smith asked in comments db.testView.stats()
returns:
{
"_t" : "CollStatsResponse",
"ok" : 1,
"ns" : "myDb.testView",
"count" : 0.0,
"size" : 0,
"avgObjSize" : 0,
"numExtents" : 0,
"lastExtentSize" : 0,
"paddingFactor" : 0,
"systemFlags" : 0,
"userFlags" : 0,
"totalIndexSize" : 0,
"indexSizes" : {
"indexSizes" : {}
}
}