Mongodb Aggregation Framework: Does $group use index?
aggregation-framework, mongodb, performance
Solution
`$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.
Problem
I'm trying to use aggregation framework with `$match` and `$group` stages. Does `$group` stage use index data? I'm using latest available mongodb version - `2.5.4`