[SERVER-13400] Allow $slice operator in aggregation pipeline Created: 28/Mar/14 Updated: 15/Apr/14 Resolved: 28/Mar/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 2.4.8 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Antonio Quintana | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| 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",
]},... 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 |
| Comments |
| Comment by Antonio Quintana [ 15/Apr/14 ] |
|
1. Sorry, I didn't find it although I looked for it before posting this |
| Comment by Scott Hernandez (Inactive) [ 28/Mar/14 ] |
|
dup of |