Limit
db.getCollection("x-x-x").find().limit(5)
Where
db.getCollection("x-x-x").find({"host":"x.com"}).limit(500)
GroupBy
db.getCollection("x-x-x").aggregate(
{"$match":{"host":"x.com"}},
{"$group":{"_id":"$json.type","count":{"$sum":1}}},
)
等效
select * from x-x-x where host="x.com" groupby "json.type"