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

Improve $cond or introduce a new pipeline operator for conditional stages

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Aggregation Framework
    • None
    • Query

    Description

      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)

      Attachments

        Activity

          People

            backlog-server-query Backlog - Query Team (Inactive)
            aharris Andrew Harris
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: