Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3391

aggregation pipeline builder does not support combined $or and ObjectId('') in $match

       

      The aggregation pipeline builder will allow a $match stage with either an ObjectId('') expression or a $or expression.  However, it will not allow those two to be combined.  Please refer to the attached screenshot.

       

      {
        $or: [
          {'start time': {$gte: ISODate('2016-02-21T11:23:47.000Z')}},
          {'end time': {$gte: ISODate('2016-02-21T11:23:47.000Z')}}
        ],
        _id:ObjectId('572bb8222b288919b68adfa5')
      }

       

      In brief testing, combining ObjectId('') with other expressions appears to work.  Combining $or with other expressions appears to work.

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            brian.blevins@mongodb.com Brian Blevins
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: