mapreduce - performing large, periodic aggregations on a data set in mongodb -
i have large collection of posts can liked user. want calculate 'trending' feature, periodically iterating on collection of posts , assigning them each 'trending' score. 'trending' score need calculated custom javascript -- not using aggregation framework of mongodb, don't think.
my questions:
1) how iterate on collection , perform these calculations? mapreduce, 'trending' score won't saved database itself, making difficult query.
2) how should 'trending' score saved? should alter main database, , insert new trending score each of documents themselves? should save copy of documents trending score in new database?
Comments
Post a Comment