The $addToSet group accumulator.
The $addToSet group accumulator.
$addFields stage.
The $addToSet group accumulator.
The $addToSet group accumulator.
Ascending sort order
Ascending sort order
The $avg group accumulator.
The $avg group accumulator.
The $avg group accumulator.
The $avg group accumulator.
$bucket aggregation stage.
$bucket aggregation stage.
Low level pipeline operator which allows to open a tailable cursor against subsequent change events of a given collection.
$collStats aggregation stage.
$count of the number of documents input.
Descending sort order
Descending sort order
Processes multiple aggregation pipelines within a single stage on the same set of input documents.
The $field group accumulator.
The $field group accumulator.
The $field group accumulator.
The $field group accumulator.
$geoNear aggregation stage, that outputs documents in order of nearest to farthest from a specified point.
The $graphLookup aggregation stage.
$groups documents together to calculate aggregates on document collections.
$groups documents together to calculate aggregates on document collections.
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 calculate aggregates on document collections.
The $field group accumulator.
The $field group accumulator.
The $field group accumulator.
The $field group accumulator.
$limits the number of documents that pass through the stream.
$listLocalSessions aggregation stage.
$listSessions aggregation stage.
Performs a left outer join to an unsharded collection in the same database to filter in documents from the "joined" collection for processing.
Filters out documents from the stream that do not match the predicate.
The $max group accumulator.
The $max group accumulator.
The $max group accumulator.
The $max group accumulator.
$merge aggregation stage.
The $mergeObjects group accumulator.
The $mergeObjects group accumulator.
Metadata sort order.
Metadata sort order.
The $min group accumulator.
The $min group accumulator.
The $min group accumulator.
The $min group accumulator.
Takes the documents returned by the aggregation pipeline and writes them to a specified collection
Aggregation pipeline (with at least one stage operator)
Aggregation pipeline (with at least one stage operator)
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.
The $push group accumulator.
The $push group accumulator.
The $push group accumulator.
The $push group accumulator.
Restricts the contents of the documents based on information stored in the documents themselves.
Promotes a specified document to the top level and replaces all other fields.
Promotes a specified document to the top level and replaces all other fields.
The $replaceWith aggregation stage.
$sample aggregation stage, that randomly selects the specified number of documents from its input.
$set aggregation stage
$skips over a number of documents before passing all further documents along the stream.
Returns a subset of an array.
Returns a subset of an array. https://docs.mongodb.com/manual/reference/operator/aggregation/slice/
$sorts the stream based on the given fields.
The $sortByCount aggregation stage.
The $sortByCount aggregation stage.
Represents that a field should be sorted on, as well as whether it should be ascending or descending.
Represents that a field should be sorted on, as well as whether it should be ascending or descending.
The $stdDevPop group accumulator.
The $stdDevPop group accumulator.
MongoDB 3.2
The $stdDevPop for a single field.
The $stdDevPop for a single field.
MongoDB 3.2
The $stdDevSamp group accumulator
The $stdDevSamp group accumulator
MongoDB 3.2
The $stdDevSamp for a single field
The $stdDevSamp for a single field
MongoDB 3.2
The $sum group accumulator.
The $sum group accumulator.
The $sum group accumulator.
The $sum group accumulator.
The $unset aggregation stage.
Turns a document with an array into multiple documents, one document for each element in the array.
The $filter aggregation stage.
(Since version 0.12.0) Use SumAll
Filter companion
Factory to declare custom call to a group function.
Factory to declare custom call to a group function.
$indexStats aggregation stage.
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 } }
import scala.concurrent.ExecutionContext import reactivemongo.api.bson.{ BSONDocument, BSONInteger, BSONString } import reactivemongo.api.bson.collection.BSONCollection def foo(coll: BSONCollection)(implicit ec: ExecutionContext) = coll.aggregateWith[BSONDocument]() { agg => import agg.PipelineOperator val stage = PipelineOperator(BSONDocument( f"$$sample" -> BSONDocument("size" -> 2))) stage -> List.empty }
$planCacheStats aggregation stage.
import scala.concurrent.ExecutionContext import reactivemongo.api.bson.{ BSONDocument, BSONInteger, BSONString } import reactivemongo.api.bson.collection.BSONCollection def foo(coll: BSONCollection)(implicit ec: ExecutionContext) = { coll.aggregateWith[BSONDocument]() { agg => import agg.{ Project, Slice } // Define the pipeline stages Project(BSONDocument( "name" -> 1, "favorites" -> Slice( array = BSONString(f"$$favorites"), n = BSONInteger(3)).makePipe)) -> List.empty } }
The $sum: 1
group accumulator.
The $sum: 1
group accumulator.
References the score associated with the corresponding $text
query for each matching document.
References the score associated with the corresponding $text
query for each matching document.
(aggregationFramework: StringAdd).self
(aggregationFramework: StringFormat).self
(aggregationFramework: ArrowAssoc[AggregationFramework[P]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(aggregationFramework: Ensuring[AggregationFramework[P]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Implements the Aggregation Framework.
PipelineOperator