Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48923

Allow union of dynamic collection names

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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]*/}}])
      

       

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: