[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:
Duplicate
duplicates SERVER-9090 Expand on the capabilities of "limit"... Closed
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 SERVER-9090.

Generated at Thu Feb 08 03:17:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.