MongoDB – Aggregation

Aggregation Commands
aggregate
count
distinct
group
mapReduce

Aggregation Methods

https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/
Pipeline Aggregation Stages
$collStats
$project
$match
$redact
$limit
$skip
$unwind : Deconstructs an array field from the input documents to output a document for each element.
$group
$sample
$sort
$geoNear
$lookup
$out
$indexStats
$facet
$bucket
$bucketAuto
$sortByCount
$addFields
$replaceRoot
$count
$graphLookup

Boolean Aggregation Operators: $and, $or, $not

Set Operators: $setEquals, $setIntersection, $setUnion, $setDifference, $setIsSubset, $anyElementTrue, $allElementsTrue

Comparison Aggregation Operators: cmp, eq, gt, gte, lt, lte, ne

Arithmetic Aggregation Operators: abs, add, ceil, divide, exp, floor, ln, log, log10, mod, multiply, pow, sqrt, subtract, trunc

String Aggregation

Text Search Aggregation

Array Aggregation Operators

Aggregation Variable Operators

Aggregation Literal Operators

Date Aggregation Operators

Conditional Aggregation Operators

Group Accumulator Operators

Limitations:
By default 100 megabytes of RAM.
set the allowDiskUse option to true to overcome this issue.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s