我有两个包含以下详细信息的集合:
注释
{"_id" : ObjectId("521588ccb5d44d23aca151a2"), "UserId" : "5215862eb5d44d23aca1519d", "Comment" : "hello" }
{"_id" : ObjectId("521588ccb5d44d23aca151a3"), "UserId" : "5215862eb5d44d23aca1519e", "Comment" : "this is cool" }
“评论”:“你好”} {“_id”:ObjectId(“521588ccb5d44d23aca151a4”),“UserId”:“5215862eb5d44d23aca1519e”,“评论”:“我喜欢 mongo”}
用户
{ "_id" : ObjectId("5215862eb5d44d23aca1519d"), "Nickname" : "Jane"}
{ "_id" : ObjectId("5215862eb5d44d23aca1519e"), "Nickname" : "Jon"}
我将如何使用 MapReduce 实现以下目标(它是否最适合手头的任务)?理想情况下,该集合也可能非常大。即数十万或数百万。
{ "UserId" : "5215862eb5d44d23aca1519d", "Comment": "Hello", "Nickname" : "Jane"}
{ "UserId" : "5215862eb5d44d23aca1519e", "Comment": "this is cool", "Nickname" : "Jon"}
{ "UserId" : "5215862eb5d44d23aca1519e", "Comment": "I like Mongo", "Nickname" : "Jon"}
Bote:我正在使用带有 .NET C# 驱动程序的 MongoDB。