[SERVER-8566] Create a "limit per match" option for $in queries Created: 14/Feb/13 Updated: 25/Jun/15 Resolved: 29/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Zak Debussy | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
As detailed in this (http://stackoverflow.com/questions/14855629/create-in-query-with-a-limit-per-match) stack overflow issue, it would be very useful to have the ability to limit a $in query so that only a certain number of results are returned PER MATCH. So, for example, say you are querying against an image collection, where each document in the collection has a 'ownerGUID' attribute which points back to a corresponding document in a collection called 'users'. Doing a $in query with an array of user GUIDS could be be limited so that only 5 image documents PER item in the array would be returned. |
| Comments |
| Comment by David Storch [ 29/Jan/15 ] |
|
Closing as a duplicate of |