$group using index

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Benjamin Appréderisse
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: