【问题标题】:MongoDB Compass Community: $match in aggregation gives “Expected ”[“ or AggregationStage but ”{“ found.”MongoDB Compass 社区:聚合中的 $match 给出“预期”[“或 AggregationStage 但”{“找到。”
【发布时间】:2019-04-10 12:49:00
【问题描述】:

我使用的是 MongoDB Compass Community 版本 1.17.0。 在尝试使用$match 作为第一步时,它给了我这个消息

【问题讨论】:

    标签: mongodb mongodb-query mongodb-compass


    【解决方案1】:

    从您的查询中删除Date 前面的new

    使用这个

    {
      utcDate: { $gt : Date("2019-04-01") }
    }
    

    【讨论】:

      【解决方案2】:

      尝试删除new

      {
       utcDate:{$gt:Date("2019-04-01")}
      }
      

      【讨论】:

        猜你喜欢
        • 2019-04-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-08-23
        • 1970-01-01
        • 2018-11-18
        相关资源
        最近更新 更多