[SERVER-1139] Capped Arrays / Limited Stacks - The ability to define a max number of elements in an array Created: 20/May/10  Updated: 03/Jun/10  Resolved: 03/Jun/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Jim Plush Assignee: Eliot Horowitz (Inactive)
Resolution: Duplicate Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

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.



 Comments   
Comment by AndrewK [ 03/Jun/10 ]

just noticed this is a duplicate of SERVER-991

Generated at Thu Feb 08 02:56:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.