如何使用带有mongodb rucommand或mongo的json日期运行此mongodb命令,它始终返回零记录。参考:https://jira.mongodb.org/browse/JAVA-565
{ "aggregate" : "dummy" , "pipeline" : [ { "$match" : { "$and" : [ { "myDate" : { "$gte" : { "$date" : "2017-07-25T18:30:00.428Z"}}} , { "myDate" : { "$lte" : { "$date" : "2017-11-02T18:29:59.428Z"}}}]}} , { "$project" : { "year" : { "$year" : [ "$myDate"]} , "duration" : { "$month" : [ "$myDate"]}}} , { "$group" : { "_id" : { "year" : "$year" , "duration" : "$duration" , "orderType" : "$orderType"} , "count" : { "$sum" : 1}}} , { "$sort" : { "_id.year" : -1 , "_id.duration" : -1}}] , "cursor" : { "batchSize" : 1000}}
问候
克里斯