Skip to content

Add $sortByCount aggregation stage [DATAMONGO-1553] #2469

Closed
@spring-projects-issues

Description

@spring-projects-issues

Mark Paluch opened DATAMONGO-1553 and commented

The $sortByCount stage is equivalent to the following $group + $sort sequence:

{ $group: { _id: <expression>, count: { $sum: 1 } } },
{ $sort: { count: -1 } }

Referenced from: pull request #519, and commits 7123f84, 9a13a3f

1 votes, 2 watchers

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions