[COMPASS-3194] cannot have two conditions in match if one is ISODate Created: 12/Oct/18  Updated: 29/Oct/23  Resolved: 06/Dec/18

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.15.4
Fix Version/s: 1.17.0, 1.18.0

Type: Bug Priority: Major - P3
Reporter: Lian Ngian (Inactive) Assignee: Durran Jordan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OS
MongoDB version 4.0.2 Enterprise


Epic Link: COMPASS-3220
Sprint: Iteration Takaioko

 Description   

IHAC who is trying to run two query conditions in the same $match stage from the aggregations component in Compass, but receives error "Expected end of input but "}" found" (both Compass version 1.15.1 and 1.15.4).

Example: { device:ObjectId('5baa4e604d7d0600019d8e95'), ts:

{ '$gte': ISODate('2018-10-04T18:30:00.000Z'), '$lte': ISODate('2018-10-05T18:29:59.999Z') }

}

 

I have been able to reproduce the error using the same Compass Version (1.15.4) and MongoDB version 4.0.2 Enterprise.

 

Workaround which customer is using is to to run the two query conditions in separate $match stage through compass.

 

Have tested using two conditions which does not include ISODate and expected results return.

 

Can you please confirm if this is a bug with Compass, if so will there be a fix?

 

Thanks in advance.

 



 Comments   
Comment by Durran Jordan [ 30/Nov/18 ]

Not limited to just ISODate, but any $match in this format: { field: bson_type, field:

{ op: bson_type, ... }
Generated at Wed Feb 07 22:32:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.