Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3037

aggregation and $merge accumulator is not working

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: None
    • Component/s: Aggregation pipeline
    • None
    • Iteration Halloumi

      Hello, I am trying to create the following aggregation pipeline but last step is not working.

      [{ $match: /** * query - The query in MQL. */
      {{Unknown macro: { codigoInternoDelContratoIuc }}}
      }, { $project: /** * specifications - The fields to * include or exclude. */{ "codigoInternoDelContratoIuc":1, all_buck: { $concatArrays: [ {$ifNull: ['$online', []]},'$buckets'] }} },
      Unknown macro: { $unwind}
      , { $group: /** * _id - The id of the group. * field1 - The first field name. */{ _id: "$all_buck.codigoRmsOperacionExtendido", mov:
      Unknown macro: { $mergeObjects}
      , count:{$sum:1 }]}}

      For mergeObjects is expecting [ ]... I have tried different version but it is not working. The same pipeline in the shell is working fine!
      Thank you i advance,

      Juan

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            juan.soto@mongodb.com Juan Soto (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: