Hack to make running date range queries and _id lookups possible