-
Type:
Improvement
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
There doesn't seem to be a way to include a $match condition that compares two fields eg to include all documents where field1 == field2:
{ "$match" : { "$field1" : { "$eq" : "$field2"}} }
We can only use operators that compare a field against values.
$where is no longer allowed in aggregate framework queries, so one cannot use arbitrary javascript to achieve this.