Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8566

Create a "limit per match" option for $in queries

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            zakdances0 Zak Debussy
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: