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

Capped Arrays / Limited Stacks - The ability to define a max number of elements in an array

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

      It would be nice to have the ability in one statement to be able to cap the elements in an array to keep a fixed stack size.

      e.g. If I want to store the latest 10 users who have visited a blog post in an array within a document. Currently this requires two operations

      Redis supports things like this with Lists and lpush, ltrim, etc..., it would be handy in mongodb as well.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            jiminoc Jim Plush
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: