Mongodb map reduce 教程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9337343/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Mongodb map reduce tutorial
提问by hotips
Possible Duplicate:
How do I use Map/Reduce in MongoDB?
I have seen the MongoDb presentationfor the new aggregation framework. There is a presentation, progressive examples etc...
我已经看到了新聚合框架的MongoDb 演示。有演示文稿,渐进式示例等...
Do you know something similar for map/reduce under MongoDB ?
你知道 MongoDB 下的 map/reduce 类似的东西吗?
I haven't found yet...
我还没找到...
回答by RameshVel
Check mongodb cookbook, you can see lot of map-reduce examples with good explanations.
检查mongodb cookbook,您可以看到很多带有很好解释的 map-reduce 示例。
Also check out my answer to other questionin SO about mongo map reduce for more info.
另请查看我对SO 中关于 mongo map reduce 的其他问题的回答以获取更多信息。
回答by ulima69
This explain clarify map reduce for me: Yet another MongoDB Map Reduce tutorial
这个解释为我澄清了 map reduce:Yet another MongoDB Map Reduce tutorial
回答by Ionic? Biz?u
Check the documentationof map reduce for MongoDB. You find there a lot of examples.
检查MongoDB 的 map reduce文档。你会发现有很多例子。
The general form for mapReduce
is this:
的一般形式mapReduce
是这样的:
db.collection.mapReduce(
<mapfunction>,
<reducefunction>,
{
out: <collection>,
query: <document>,
sort: <document>,
limit: <number>,
finalize: <function>,
scope: <document>,
jsMode: <boolean>,
verbose: <boolean>
}
);