Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21502

$group using index

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • None
    • None
    • Aggregation Framework
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: