Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何将以下查询重现为 map reduce 或 MongoMapper 或 MongoID 的任何果汁函数:
Event.find(:all,:select=>'events.company,SUM(price) as total_price', :group=> 'company',:order => ' total_price DESC, created_at DESC')
这是 MapReduce 的一个基本案例。您可以查看相关文档:
http://www.mongodb.org/display/DOCS/MapReduce