-
Type: New Feature
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:None
-
Query
As far as I'm aware you can use $cond as if..then..else but only for expressions.
It would be useful if whole pipeline stages could be executed conditionally.
i.e.
if <input document satisifies condition> then
execute $group stage (or whatever)
else
execute a different $group stage (or whatever)