【发布时间】:2014-02-01 03:30:07
【问题描述】:
我创建了 map reduce 函数来获取所有文档及其计数。 我现在需要删除所有重复项。我该怎么做?
res = col.map_reduce(map,reduce,"my_results");
提供如下输出:
{u'_id': u'http://www.hardassetsinvestor.com/features/5485-soft-commodity-q4-report-low-inventories-buoy-cocoa-growing-stocks-weigh-on-coffee-cotton-a-sugar.html', u'value': 2.0}
{u'_id': u'http://www.hardassetsinvestor.com/market-monitor-archive/5490-week-in-review-gold-a-silver-kick-off-2014-strongly-oil-a-natgas-stall.html', u'value': 2.0}
【问题讨论】: