Mongodb查询以查找特定字段的最大不同值

时间:2019-05-11 02:28:38

标签: mongodb nosql mongodb-query aggregation-framework

我是mongodb的新手,需要查找具有最大数量的唯一用户的文章。示例文档结构如下。

_id: 5cce47a3d700d695d029a59a
revid:886312343
parentid:857749244
minor:false
user
:"InternetArchiveBot"
userid
:27015025
timestamp:"2019-03-05T14:21:07Z"
size:38883
sha1:"5f40e3510200181b0623aec6073196a58ffbdff3"
parsedcomment:"Rescuing 4 sources and tagging 1 as dead. #IABot (v2.0beta11) (<a href..."
title:"Adrian Cole (RAAF officer)"

0 个答案:

没有答案