-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:
-
Query Optimization
The $unionWith stage requires a collection name given as a string. It would be great if we could add an option for somehow specifying a regex or an array/range to union many collections at once. Perhaps something like
db.example.aggregate([{$unionWith: {regex: /^months2020.[0-9]*/}}])