I have a set like so
{date: 20120101} {date: 20120103} {date: 20120104} {date: 20120005} {date: 20120105}
How do I save a subset of those d
Here's the shell version:
db.full_set.find({date:"20120105"}).forEach(function(doc){ db.subset.insert(doc); });
Note: As of MongoDB 2.6, the aggregation framework makes it possible to do this faster; see melan's answer for details.