object Aggregate extends Aggregate
- Alphabetic
- By Inheritance
- Aggregate
- Aggregate
- Serializable
- AsJava
- AsJavaConverters
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addFields[TExpression](field: (String, TExpression), fields: (String, TExpression)*): Aggregate
- Definition Classes
- Aggregate
- def addFields[TExpression](fields: List[(String, TExpression)]): Aggregate
Creates a $addFields pipeline stage.
Creates a $addFields pipeline stage. With $addFields you can add new fields the document.
- returns
Aggregate with $addFields pipeline stage https://www.mongodb.com/docs/manual/reference/operator/aggregation/addFields/
- Definition Classes
- Aggregate
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava[K, V](m: Map[K, V]): ConcurrentMap[K, V]
- Definition Classes
- AsJavaConverters
- def asJava[K, V](m: Map[K, V]): Map[K, V]
- Definition Classes
- AsJavaConverters
- def asJava[K, V](m: Map[K, V]): Map[K, V]
- Definition Classes
- AsJavaConverters
- def asJava[A](s: Set[A]): Set[A]
- Definition Classes
- AsJavaConverters
- def asJava[A](s: Set[A]): Set[A]
- Definition Classes
- AsJavaConverters
- def asJava[A](s: Seq[A]): List[A]
- Definition Classes
- AsJavaConverters
- def asJava[A](s: Seq[A]): List[A]
- Definition Classes
- AsJavaConverters
- def asJava[A](b: Buffer[A]): List[A]
- Definition Classes
- AsJavaConverters
- def asJava[A](i: Iterable[A]): Iterable[A]
- Definition Classes
- AsJavaConverters
- def asJava[A](i: Iterator[A]): Iterator[A]
- Definition Classes
- AsJavaConverters
- def asJavaCollection[A](i: Iterable[A]): Collection[A]
- Definition Classes
- AsJavaConverters
- def asJavaDictionary[K, V](m: Map[K, V]): Dictionary[K, V]
- Definition Classes
- AsJavaConverters
- def asJavaEnumeration[A](i: Iterator[A]): Enumeration[A]
- Definition Classes
- AsJavaConverters
- def bucket[TExpression](groupBy: TExpression, boundaries: Seq[Double], options: BucketOptions = new BucketOptions()): Aggregate
Creates a $bucket pipeline stage
Creates a $bucket pipeline stage
- groupBy
the criteria to group By
- boundaries
the boundaries of the buckets
- options
the optional values for the $bucket stage
- returns
Aggregate $bucket pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/bucket/
- Definition Classes
- Aggregate
- def bucketAuto[TExpression](groupBy: TExpression, buckets: Int, options: BucketAutoOptions = new BucketAutoOptions()): Aggregate
Creates a $bucketAuto pipeline stage.
Creates a $bucketAuto pipeline stage.
- groupBy
the criteria to group By
- buckets
the number of the buckets
- options
the optional values for the $bucketAuto stage
- returns
Aggregate with $bucketAuto pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/
- Definition Classes
- Aggregate
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def combinedWith(anotherAggregate: Aggregate): Aggregate
Merges 2 aggregation pipelines together.
Merges 2 aggregation pipelines together.
- anotherAggregate
the aggregate to be merged with
- returns
the aggregate pipeline
- Definition Classes
- Aggregate
- def count(field: String): Aggregate
Creates a $count pipeline stage using the named field to store the result.
Creates a $count pipeline stage using the named field to store the result.
- field
the field in which to store the count
- returns
Aggregate with $count pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/count/
- Definition Classes
- Aggregate
- def count: Aggregate
Creates a $count pipeline stage using the field name "count" to store the result.
Creates a $count pipeline stage using the field name "count" to store the result.
- returns
Aggregate with $count pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/count/
- Definition Classes
- Aggregate
- def densify(field: String, range: DensifyRange, options: DensifyOptions = DensifyOptions.densifyOptions()): Aggregate
Creates a $densify pipeline stage, which adds documents to a sequence of documents where certain values in the field are missing.
Creates a $densify pipeline stage, which adds documents to a sequence of documents where certain values in the field are missing.
- field
The field to densify.
- range
The range.
- options
The densify options.
- returns
Aggregate with requested pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/densify/
- Definition Classes
- Aggregate
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- Aggregate → AnyRef → Any
- def facet(facets: Facet*): Aggregate
- Definition Classes
- Aggregate
- def facet(facets: List[Facet]): Aggregate
Creates a facet pipeline stage.
Creates a facet pipeline stage.
- facets
the facets to use
- returns
Aggregate with $facets pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/facet/
- Definition Classes
- Aggregate
- def fill(options: FillOptions, output: FillOutputField, outputs: FillOutputField*): Aggregate
- Definition Classes
- Aggregate
- def fill(options: FillOptions, outputs: List[FillOutputField]): Aggregate
Creates a $fill pipeline stage, which assigns values to fields when they are Null or missing.
Creates a $fill pipeline stage, which assigns values to fields when they are Null or missing.
- options
The fill options.
- outputs
The FillOutputField.
- returns
Aggregate with requested pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/fill/
- Definition Classes
- Aggregate
- def geoNear(point: Point, distanceField: String, options: GeoNearOptions = GeoNearOptions.geoNearOptions()): Aggregate
Creates a $geoNear pipeline stage that outputs documents in order of nearest to farthest from a specified point.
Creates a $geoNear pipeline stage that outputs documents in order of nearest to farthest from a specified point.
- point
The point for which to find the closest documents.
- distanceField
The output field that contains the calculated distance. To specify a field within an embedded document, use dot notation.
- options
GeoNearOptions
- returns
Aggregate with requested pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/
- Definition Classes
- Aggregate
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def graphLookup[TExpression](from: String, startWith: TExpression, connectFromField: String, connectToField: String, as: String, options: GraphLookupOptions = new GraphLookupOptions()): Aggregate
Creates a graphLookup pipeline stage for the specified filter.
Creates a graphLookup pipeline stage for the specified filter.
- from
the collection to query
- startWith
the expression to start the graph lookup with
- connectFromField
the from field
- connectToField
the to field
- as
name of field in output document
- options
optional values for the graphLookup
- returns
Aggregate with $graphLookup pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/
- Definition Classes
- Aggregate
- def group[TExpression](id: TExpression, fieldAccumulators: Accumulator): Aggregate
Creates a $group pipeline stage for the specified filter.
Creates a $group pipeline stage for the specified filter.
- id
the id expression for the group
- fieldAccumulators
zero or more field accumulator pairs
- returns
Aggregate with $group pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/group/
- Definition Classes
- Aggregate
- def hashCode(): Int
- Definition Classes
- Aggregate → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def limit(n: Int): Aggregate
Creates a $limit pipeline stage for the specified filter
Creates a $limit pipeline stage for the specified filter
- n
the limit
- returns
Aggregate with $limit pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/limi/
- Definition Classes
- Aggregate
- def lookup(from: String, pipeline: Aggregate, as: String): Aggregate
Creates a $lookup pipeline stage, joining the current collection with the one specified in from using the given pipeline.
Creates a $lookup pipeline stage, joining the current collection with the one specified in from using the given pipeline.
- from
the name of the collection in the same database to perform the join with.
- pipeline
the pipeline to run on the joined collection.
- as
the name of the new array field to add to the input documents.
- returns
Aggregate with $lookup pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/
- Definition Classes
- Aggregate
- def lookup(from: String, localField: String, foreignField: String, as: String): Aggregate
Creates a $lookup pipeline stage, joining the current collection with the one specified in from using equality match between the local field and the foreign field.
Creates a $lookup pipeline stage, joining the current collection with the one specified in from using equality match between the local field and the foreign field.
- from
the name of the collection in the same database to perform the join with.
- localField
the field from the local collection to match values against.
- foreignField
the field in the from collection to match values against.
- as
the name of the new array field to add to the input documents.
- returns
Aggregate with $lookup pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/
- Definition Classes
- Aggregate
- def matchBy(filter: Filter): Aggregate
Creates a $match pipeline stage for the specified filter.
Creates a $match pipeline stage for the specified filter.
- filter
the filter to match
- returns
Aggregate with $match pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/match/
- Definition Classes
- Aggregate
- def merge(collectionName: String, options: MergeOptions = new MergeOptions()): Aggregate
Creates a $merge pipeline stage that merges into the specified collection using the specified options.
Creates a $merge pipeline stage that merges into the specified collection using the specified options.
- collectionName
the name of the collection to merge into
- options
the merge options
- returns
Aggregate with $merge pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/merge/
- Definition Classes
- Aggregate
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def out(databaseName: String, collectionName: String): Aggregate
Creates a $out pipeline stage that supports outputting to a different database.
Creates a $out pipeline stage that supports outputting to a different database.
- databaseName
the database name
- collectionName
the collection name
- returns
Aggregate with $out pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/out/
- Definition Classes
- Aggregate
- def out(collectionName: String): Aggregate
Creates a $out pipeline stage that writes into the specified collection
Creates a $out pipeline stage that writes into the specified collection
- collectionName
the collection name
- returns
Aggregate with $out pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/out/
- Definition Classes
- Aggregate
- def project(projection: Projection): Aggregate
Creates a $project pipeline stage for the specified projection.
Creates a $project pipeline stage for the specified projection.
- projection
the projection
- returns
Aggregate with $project pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/project/
- Definition Classes
- Aggregate
- def replaceWith[TExpression](value: TExpression): Aggregate
Creates a $replaceRoot pipeline stage.
Creates a $replaceRoot pipeline stage. With $replaceWith you can promote an embedded document to the top-level. You can also specify a new document as the replacement.
- value
the new root value
- returns
Aggregate with $replaceRoot pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/replaceWith/
- Definition Classes
- Aggregate
- def sample(size: Int): Aggregate
Creates a $sample pipeline stage with the specified sample size.
Creates a $sample pipeline stage with the specified sample size.
- size
the sample size
- returns
Aggregate with $sample pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/sample/
- Definition Classes
- Aggregate
- def search(collector: SearchCollector): Aggregate
- Definition Classes
- Aggregate
- def search(collector: SearchCollector, options: SearchOptions): Aggregate
Creates a $search pipeline stage supported by MongoDB Atlas.
Creates a $search pipeline stage supported by MongoDB Atlas. You may use $meta: "searchScore", e.g., via Projection.metaSearchScore(String), to extract the relevance score assigned to each found document.
- collector
A search collector.
- options
Optional $search pipeline stage fields.
- returns
Aggregate with $search pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/search/
- Definition Classes
- Aggregate
- def search(operator: SearchOperator): Aggregate
- Definition Classes
- Aggregate
- def search(operator: SearchOperator, options: SearchOptions): Aggregate
Creates a $search pipeline stage supported by MongoDB Atlas.
Creates a $search pipeline stage supported by MongoDB Atlas. You may use $meta: "searchScore", e.g., via Projection.metaSearchScore(String), to extract the relevance score assigned to each found document.
- operator
A search operator.
- options
Optional $search pipeline stage fields.
- returns
Aggregate with requested pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/search/
- Definition Classes
- Aggregate
- def searchMeta(collector: SearchCollector): Aggregate
- Definition Classes
- Aggregate
- def searchMeta(collector: SearchCollector, options: SearchOptions): Aggregate
Creates a $searchMeta pipeline stage supported by MongoDB Atlas.
Creates a $searchMeta pipeline stage supported by MongoDB Atlas. Unlike $search, it does not return found documents, instead it returns metadata, which in case of using the $search stage may be extracted by using $$SEARCH_META variable, e.g., via Projection.computedSearchMeta(String).
- collector
A search collector.
- options
Optional $search pipeline stage fields.
- returns
Aggregate with $searchMeta pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/searchMeta/
- Definition Classes
- Aggregate
- def searchMeta(operator: SearchOperator): Aggregate
- Definition Classes
- Aggregate
- def searchMeta(operator: SearchOperator, options: SearchOptions): Aggregate
Creates a $searchMeta pipeline stage supported by MongoDB Atlas.
Creates a $searchMeta pipeline stage supported by MongoDB Atlas. Unlike $search, it does not return found documents, instead it returns metadata, which in case of using the $search stage may be extracted by using $$SEARCH_META variable, e.g., via Projection.computedSearchMeta(String).
- operator
A search operator.
- options
Optional $search pipeline stage fields.
- returns
Aggregate with $searchMeta pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/searchMeta/
- Definition Classes
- Aggregate
- def set[TExpression](field: (String, TExpression), fields: (String, TExpression)*): Aggregate
- Definition Classes
- Aggregate
- def set[TExpression](fields: List[(String, TExpression)]): Aggregate
Creates a $set pipeline stage for the specified projection.
Creates a $set pipeline stage for the specified projection.
- fields
the fields to add
- returns
Aggregate with $set pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/set/
- Definition Classes
- Aggregate
- def setWindowFields(sortBy: Sort, outputs: Seq[WindowOutputField]): Aggregate
Creates a $setWindowFields pipeline stage, which allows using window operators.
Creates a $setWindowFields pipeline stage, which allows using window operators. This stage sorts input documents, computes fields in the documents by computing window functions over windows specified per function, and outputs the documents. Here, documents will belong to the same partition.
- sortBy
Fields to sort by. Sorting is required by certain functions and may be required by some windows. Sorting is used only for the purpose of computing window functions and does not guarantee ordering of the output documents.
- returns
Aggregate with $setWindowFields pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/setWindowFields/
- Definition Classes
- Aggregate
- def setWindowFields[TExpression](partitionBy: TExpression, sortBy: Sort, outputs: Seq[WindowOutputField]): Aggregate
Creates a $setWindowFields pipeline stage, which allows using window operators.
Creates a $setWindowFields pipeline stage, which allows using window operators. This stage partitions the input documents similarly to the $group pipeline stage, sorts them, computes fields in the documents by computing window functions over windows specified per function, and outputs the documents. The important difference from the $group pipeline stage is that documents belonging to the same partition or window are not folded into a single document.
- partitionBy
Partitioning of data specified like id in $group.
- sortBy
Fields to sort by. Sorting is required by certain functions and may be required by some windows. Sorting is used only for the purpose of computing window functions and does not guarantee ordering of the output documents.
- returns
Aggregate with $setWindowFields pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/setWindowFields/
- Definition Classes
- Aggregate
- def skip(n: Int): Aggregate
Creates a $skip pipeline stage.
Creates a $skip pipeline stage.
- n
the number of documents to skip
- returns
Aggregate with $skip pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/skip/
- Definition Classes
- Aggregate
- def sort(sort: Sort): Aggregate
Creates a $sort pipeline stage for the specified sort specification.
Creates a $sort pipeline stage for the specified sort specification.
- sort
the sort specification
- returns
Aggregate with $sort pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/sort/
- Definition Classes
- Aggregate
- def sortByCount[TExpression](filter: TExpression): Aggregate
Creates a $sortByCount pipeline stage for the specified filter.
Creates a $sortByCount pipeline stage for the specified filter.
- filter
the filter specification
- returns
Aggregate with $sortByCount pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/
- Definition Classes
- Aggregate
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Aggregate → AnyRef → Any
- def unionWith(collection: String, pipeline: Aggregate): Aggregate
Creates a $unionWith pipeline stage.
Creates a $unionWith pipeline stage.
- collection
the name of the collection in the same database to perform the union with.
- pipeline
the pipeline to run on the union.
- returns
Aggregate with $unionWith pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/unionWith/
- Definition Classes
- Aggregate
- def unset(fields: String*): Aggregate
- Definition Classes
- Aggregate
- def unset(fields: List[String]): Aggregate
Creates an $unset pipeline stage.
Creates an $unset pipeline stage. With $unset you can removes/excludes fields from documents.
- fields
the fields to exclude. May use dot notation.
- returns
Aggregate with $unset aggregate stage https://www.mongodb.com/docs/manual/reference/operator/aggregation/unset/
- Definition Classes
- Aggregate
- def unwind(fieldName: String, unwindOptions: UnwindOptions = UnwindOptions()): Aggregate
Creates a $unwind pipeline stage for the specified field name, which must be prefixed by a '$' sign.
Creates a $unwind pipeline stage for the specified field name, which must be prefixed by a '$' sign.
- fieldName
the field name, prefixed by a '$' sign
- unwindOptions
options for the unwind pipeline stage
- returns
Aggregate with $unwind pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/
- Definition Classes
- Aggregate
- def vectorSearch(path: FieldSearchPath, queryVector: Seq[Double], index: String, limit: Long, options: VectorSearchOptions = VectorSearchOptions.exactVectorSearchOptions()): Aggregate
Creates a $vectorSearch pipeline stage supported by MongoDB Atlas.
Creates a $vectorSearch pipeline stage supported by MongoDB Atlas. You may use the $meta: "vectorSearchScore" expression, e.g., via Projection.metaVectorSearchScore(String), to extract the relevance score assigned to each found document.
- path
The field to be searched.
- queryVector
The query vector. The number of dimensions must match that of the index.
- index
The name of the index to use.
- limit
The limit on the number of documents produced by the pipeline stage.
- options
Optional $vectorSearch pipeline stage fields.
- returns
The Aggregate with $vectorSearch pipeline stage https://docs.mongodb.com/manual/reference/operator/aggregation/vectorSearch/
- Definition Classes
- Aggregate
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)