Aggregation Commands

On this page本页内容

Note

For details on specific operator, including syntax and examples, click on the specific operator to go to its reference page.有关特定运算符的详细信息,包括语法和示例,请单击特定运算符以转到其参考页。

Aggregation Commands聚合命令

Name名称Description描述
aggregate Performs aggregation tasks such as group using the aggregation framework.使用聚合框架执行聚合任务,如分组。
count Counts the number of documents in a collection or a view.统计集合或视图中的文档数。
distinct Displays the distinct values found for a specified key in a collection or a view.显示在集合或视图中为指定键找到的不同值。
mapReduce Performs map-reduce aggregation for large data sets.对大型数据集执行map-reduce聚合。

Aggregation Methods聚合方法

Name名称Description描述
db.collection.aggregate() Provides access to the aggregation pipeline.提供对聚合管道的访问。
db.collection.mapReduce() Performs map-reduce aggregation for large data sets.对大型数据集执行map-reduce聚合。