Unrecognized pipeline stage name: '$setWindowFields'

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Works as Designed
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • 1
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Hi, when trying to place the new $setWindowFields it just fires the folowwing error.

      My mongodb driver version is 4.0.1, so accordingly to the specification, it should support mongodb 5.0 features.

       
      const prov = await Sales.aggregate([
                      {'$setWindowFields':

      {                     sortBy: \{reference: -1}

      ,
                          output: {
                              accumQ: {
                                  $sum: '$lines.quantity',
                                  widow:

      {                                 documents: ['unbounded', 'current']                             }

                              }
                          }

                      }}
                  ])
                  .toArray();
                  console.log('prov', prov);
       

       

       

        1. image-2021-12-18-22-46-12-006.png
          314 kB
          kevin Morte i Piferrer
        2. image-2021-12-18-22-46-19-251.png
          314 kB
          kevin Morte i Piferrer

            Assignee:
            Unassigned
            Reporter:
            kevin Morte i Piferrer
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: