Mongodb Aggregation Framework: Does $group use index?

$group does not use index data.

From the mongoDB docs:

The $match and $sort pipeline operators can take advantage of an index when they occur at the beginning of the pipeline.

The $geoNear pipeline operator takes advantage of a geospatial index.
When using $geoNear, the $geoNear pipeline operation must appear as
the first stage in an aggregation pipeline.

Leave a Comment