{
"_id" : ObjectId("55115e69288dbca12d2ed079"),
"gameId" : "acadcf1a-b557-4ef9-ab3b-636e1f7f909f",
"sportName" : "NCAAMB",
"scheduleType" : "days",
"status" : "closed",//enumeration : Inprogress, completed,closed
"scheduledOn" : ISODate("2015-03-12T22:30:00Z"),
"year" : 2014,
"season" : "CT",
"week" : null,
"homeTeam" : {
"name" : "Indiana Hoosiers",
"nameCode" : "IND"
},
"awayTeam" : {
"name" : "Northwestern Wildcats",
"nameCode" : "NW"
}
}
{
"_id" : ObjectId("55115e69288dbca12d2ed0a3"),
"gameId" : "098a3888-ff77-469c-a762-e883570d8a16",
"sportName" : "NCAAMB",
"scheduleType" : "days",
"status" : "closed", //enumeration : Inprogress, completed,closed
"scheduledOn" : ISODate("2015-03-13T22:30:00Z"),
"year" : 2014,
"season" : "CT",
"week" : null,
"homeTeam" : {
"name" : "Maryland Terrapins",
"nameCode" : "MD"
},
"awayTeam" : {
"name" : "Indiana Hoosiers",
"nameCode" : "IND"
}
}
內的子查詢我在MongoDB中「得分」的收集,我想找個地方要麼homeTeam或awayTeam nameCode應該是「IND」的數據。和MongoDB的:我們是如何寫的MongoDB
「scheduledOn」應大於當前的時間和小於CURRENT_TIME + 48小時, 如果結果計數爲0,上述標準的基礎上,則第二條件將是
「狀態」應爲‘INPROGRESS’ 如果再導致計數爲0,第二標準的基礎上,那麼第三個條件將
由隊出戰的基礎上,最後一場比賽‘scheduledOn’
如果我們沒有結果,響應空白陣列或返回完整的數據