Please enable JavaScript.
Coggle requires JavaScript to display documents.
Collection Methods (aggregate (pipeline operators ($bucket (output (e.g. {…
Collection Methods
aggregate
pipeline operators
$facet
Allows categorize and group incoming documents the same input data with different DAGs (array of pipeline operations) and output results respectively.
Input data will be read from DB only once.
$bucket
output
e.g. {
"count" : {$sum : 1},
"output-field-name": {$push: $src-field-name}
}
-
-
boundaries
define the buckets in an array like [0, 50, 100, 200]
-
-
-
-
-
$sortByCount
count a field or expression, and sort in desc.
{"_id": "term to count", "count": count}
bulkWrite
specify a list of write operations, writeConcern and boolean for sorted or not
-