mongodb mapreduce如何分页?
世界只因有你
世界只因有你 2017-04-27 09:02:46
0
1
539
{mapreduce:"topic",
    query:{'time':{'$gte':1443715200}},
    map:function(){emit({name:this.name},this.clickNum);},
    reduce:function(clickNum,numbers){return Array.sum(numbers);},
    out:{inline:1}});

用上面的代码查询后一共有300条数据,这个时候如何对集合进行分页,比如一页20条

世界只因有你
世界只因有你

reply all(1)
迷茫

out can be output to a certain collection, and then query and paginate the collection

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!