Details
-
New Feature
-
Resolution: Duplicate
-
Minor - P4
-
None
-
2.4.8
-
None
Description
I'm trying to get the top (and bottom) N cities, sorted by population and grouped by year.
After some $sorts's, $group's and $push's, I've got something like this:
{_id: "2013",
cities:[
|
|
|
|
]},...
Now, I want to do perform {$project: {cities: {$slice: N}}}
I think the $project operator should accept all of the operators the projection document does in the find() command
Attachments
Issue Links
- duplicates
-
SERVER-6074 Allow $slice operator in $project
-
- Closed
-