• Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None

      It would be great for a $group stage to use indexes for easy group.

      For example, this aggregation

      [
      {
          $group: {
              _id: "$media",
              count: {$sum:1}
          }
      },
      {
          $sort: {
              count: 1
          }
      },
      {
          $limit: 10
      }
      ]
      

      is not using the "media" index.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bappr Benjamin Appréderisse
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: