MongoDB-design for revisioned data -
there many articles , questions mongodb data-model storing old revisions of documents. however, found nothing satisfying 1 of requirements; need able retroactively query database unambiguously find documents matched arbitrary criteria given point in time. to clarify, need able efficiently answer question; "which documents (and preferably versions) matched criteria {x:y...} @ time t". pseudocode: /* match version active 2010 - 2016-05-01 zipcode 12345 */ db.my_objs.find({zipcode: "12345", ~time: isodate("2016-01-01 22:14:31.003")~}) i haven't managed find solution, neither on google nor myself. have tried; having simple "from"-timestamp on data, , select "the first item before queried timepoint, matches other criteria", have not managed express in mongo. having from/to on each version, , whenever write new version, update "to" on previous version match on new version. however, have not found way atom...