MongoDB Compass 社区:聚合中的 $match 给出了“预期的”[“或 AggregationStage 但找到了”{“。”
MongoDB Compass Community: $match in aggregation gives “Expected ”[“ or AggregationStage but ”{“ found.”
我正在使用 MongoDB Compass 社区版本 1.17.0。
在尝试使用 $match
作为第一步时,它给了我这条消息
从您的查询中删除 Date
前面的 new
。
使用这个
{
utcDate: { $gt : Date("2019-04-01") }
}
尝试删除 new
{
utcDate:{$gt:Date("2019-04-01")}
}
我正在使用 MongoDB Compass 社区版本 1.17.0。
在尝试使用 $match
作为第一步时,它给了我这条消息
从您的查询中删除 Date
前面的 new
。
使用这个
{
utcDate: { $gt : Date("2019-04-01") }
}
尝试删除 new
{
utcDate:{$gt:Date("2019-04-01")}
}