If the history documents are small enough, you could store them in an array and then use the $push, $each and $slice operators to limit the array’s size.