Since MongoDB 3.4
Since MongoDB 3.4
The fields to include. The resulting objects will also contain these fields.
https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/
the $addToSet
expression
the sequence of MongoDB aggregation operations
specifies to return the information on the processing of the pipeline
enables writing to temporary files
the cursor object for aggregation
available only if you specify the $out aggregation operator
the read concern (since MongoDB 3.2)
the documents of the first batch
the cursor from the result, if any
Ascending sort order
Since MongoDB 3.4 Categorizes incoming documents into a specific number of groups, called buckets, based on a specified expression.
Since MongoDB 3.4
Categorizes incoming documents into a specific number of groups, called buckets,
based on a specified expression. Bucket boundaries are automatically determined
in an attempt to evenly distribute the documents into the specified number of buckets.
Document fields identifier must be prefixed with $
.
https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/
the initial batch size for the cursor
Descending sort order
The $filter aggregation stage.
The $filter aggregation stage.
the expression that resolves to an array
The variable name for the element in the input array. The as expression accesses each element in the input array by this variable.
the expression that determines whether to include the element in the resulting array
Outputs documents in order of nearest to farthest from a specified point.
Outputs documents in order of nearest to farthest from a specified point.
http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/#pipe._S_geoNear
the point for which to find the closest documents
if using a 2dsphere index
the maximum number of documents to return
the maximum distance from the center point that the documents can be
limits the results to the matching documents
the factor to multiply all distances returned by the query
if this value is true, the query returns a matching document once
the output field that contains the calculated distance
this specifies the output field that identifies the location used to calculate the distance
Groups documents together to calulate aggregates on document collections.
Groups documents together to calulate aggregates on document collections.
This command aggregates on arbitrary identifiers.
Document fields identifier must be prefixed with $
.
http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group
any BSON value acceptable by mongodb as identifier
the sequence of operators specifying aggregate calculation
Groups documents together to calulate aggregates on document collections.
Groups documents together to calulate aggregates on document collections. This command aggregates on one field. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group
the name of the field to aggregate on
the sequence of operators specifying aggregate calculation
Represents one of the group/accumulator operators,
for the $group
aggregation.
Represents one of the group/accumulator operators,
for the $group
aggregation. Operation.
https://docs.mongodb.com/manual/reference/operator/aggregation/group/#accumulator-operator
Groups documents together to calulate aggregates on document collections.
Groups documents together to calulate aggregates on document collections. This command aggregates on multiple fields, and they must be named. http://docs.mongodb.org/manual/reference/aggregation/group/#_S_group
The fields to aggregate on, and the names they should be aggregated under.
the sequence of operators specifying aggregate calculation
the number of operations that used the index
the time from which MongoDB gathered the statistics
the index name
the key specification
the hostname and port of the mongod
the index statistics
Limits the number of documents that pass through the stream.
Limits the number of documents that pass through the stream. http://docs.mongodb.org/manual/reference/aggregation/limit/#_S_limit
the number of documents to allow through
_Since MongoDB 3.2:_ Performs a left outer join to an unsharded collection in the same database to filter in documents from the "joined" collection for processing.
_Since MongoDB 3.2:_ Performs a left outer join to an unsharded collection in the same database to filter in documents from the "joined" collection for processing. https://docs.mongodb.com/v3.2/reference/operator/aggregation/lookup/#pipe._S_lookup
the collection to perform the join with
the field from the documents input
the field from the documents in the from
collection
the name of the new array field to add to the input documents
Filters out documents from the stream that do not match the predicate.
Filters out documents from the stream that do not match the predicate. http://docs.mongodb.org/manual/reference/aggregation/match/#_S_match
the query that documents must satisfy to be in the stream
the $max
expression
Metadata sort order.
Metadata sort order.
the metadata keyword to sort by
the $min
expression
Takes the documents returned by the aggregation pipeline and writes them to a specified collection http://docs.mongodb.org/manual/reference/operator/aggregation/out/#pipe._S_out
Takes the documents returned by the aggregation pipeline and writes them to a specified collection http://docs.mongodb.org/manual/reference/operator/aggregation/out/#pipe._S_out
the name of the output collection
One of MongoDBs pipeline operators for aggregation.
One of MongoDBs pipeline operators for aggregation. Sealed as these are defined in the MongoDB specifications, and clients should not have custom operators.
Reshapes a document stream by renaming, adding, or removing fields.
Reshapes a document stream by renaming, adding, or removing fields. Also uses Project to create computed values or sub-objects.
The fields to include. The resulting objects will contain only these fields.
the $push
expression
Restricts the contents of the documents based on information stored in the documents themselves.
Restricts the contents of the documents based on information stored in the documents themselves. http://docs.mongodb.org/manual/reference/operator/aggregation/redact/#pipe._S_redact Redact
the redact expression
Randomly selects the specified number of documents from its input.
Randomly selects the specified number of documents from its input. https://docs.mongodb.org/master/reference/operator/aggregation/sample/
the number of documents to return
Skips over a number of documents before passing all further documents along the stream.
Skips over a number of documents before passing all further documents along the stream. http://docs.mongodb.org/manual/reference/aggregation/skip/#_S_skip
the number of documents to skip
Sorts the stream based on the given fields.
Sorts the stream based on the given fields. http://docs.mongodb.org/manual/reference/aggregation/sort/#_S_sort
the fields to sort by
Represents that a field should be sorted on, as well as whether it should be ascending or descending.
The $stdDevPop group accumulator (since MongoDB 3.2)
The $stdDevPop group accumulator (since MongoDB 3.2)
The $stdDevPop for a single field (since MongoDB 3.2)
The $stdDevPop for a single field (since MongoDB 3.2)
The $stdDevSamp group accumulator (since MongoDB 3.2)
The $stdDevSamp group accumulator (since MongoDB 3.2)
The $stdDevSamp for a single field (since MongoDB 3.2)
The $stdDevSamp for a single field (since MongoDB 3.2)
the $sum
expression
Turns a document with an array into multiple documents, one document for each element in the array.
Turns a document with an array into multiple documents, one document for each element in the array. http://docs.mongodb.org/manual/reference/aggregation/unwind/#_S_unwind
the name of the array to unwind
(Since version 0.12.0) Use SumAll
Returns an boolean as a serialized value.
Returns an boolean as a serialized value.
Returns an double as a serialized value.
Returns an double as a serialized value.
Returns a producer of element for the given name
and value
.
Returns a producer of element for the given name
and value
.
the element name
the element value
Returns an integer as a serialized value.
Returns an integer as a serialized value.
Returns an long as a serialized value.
Returns an long as a serialized value.
Returns a non empty array of values
Returns a non empty array of values
Returns a document from a sequence of element producers.
Returns a document from a sequence of element producers.
Returns an string as a serialized value.
Returns an string as a serialized value.
Filter companion
Factory to declare custom call to a group function.
Factory to declare custom call to a group function.
Since MongoDB 3.2 https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/
Only for advanced user: Factory for stage not already provided in the API.
Only for advanced user: Factory for stage not already provided in the API.
For example for { $sample: { size: 2 } }
PipelineOperator(BSONDocument("$sample" -> BSONDocument("size" -> 2)))
Sum operation of the form $sum: 1
Sum operation of the form $sum: 1
References the score associated with the corresponding $text
query for each matching document.
Implements the Aggregation Framework.