The template for a $sortByCount stage is incorrect

XMLWordPrintableJSON

    • Not Needed
    • None

      Problem Statement/Rationale

      In the aggregation builder the template for a $sortByCount stage is:

      
      /**
       * expression: Grouping expression or string.
       */
      {
        expression
      }

      the braces are invalid a valid stage is:

      {$sortByCount: "$fieldName"}

      so the template should be:

      /**
       * expression: Grouping expression or string.
       */
        expression

      **

      Please be sure to attach relevant logs with any sensitive data redacted.
      How to retrieve logs for: Compass; Shell

      Steps to Reproduce

      Create a $sortByStage in the aggregation builder

      Expected Results

      template is valid

      Actual Results

      Error message "Stage value is invalid"

       

              Assignee:
              Unassigned
              Reporter:
              Peter Williamson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: