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

The template for a $sortByCount stage is incorrect

    • Not Needed
    • Up for triaging

      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 Unassigned
            Reporter:
            peter.williamson@mongodb.com Peter Williamson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: