Packages

object Aggregate extends Aggregate

Linear Supertypes
Aggregate, Serializable, AsJava, AsJavaConverters, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Aggregate
  2. Aggregate
  3. Serializable
  4. AsJava
  5. AsJavaConverters
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Facet(name: String, pipeline: Aggregate) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addFields[TExpression](field: (String, TExpression), fields: (String, TExpression)*): Aggregate
    Definition Classes
    Aggregate
  5. 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
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def asJava[K, V](m: Map[K, V]): ConcurrentMap[K, V]
    Definition Classes
    AsJavaConverters
  8. def asJava[K, V](m: Map[K, V]): Map[K, V]
    Definition Classes
    AsJavaConverters
  9. def asJava[K, V](m: Map[K, V]): Map[K, V]
    Definition Classes
    AsJavaConverters
  10. def asJava[A](s: Set[A]): Set[A]
    Definition Classes
    AsJavaConverters
  11. def asJava[A](s: Set[A]): Set[A]
    Definition Classes
    AsJavaConverters
  12. def asJava[A](s: Seq[A]): List[A]
    Definition Classes
    AsJavaConverters
  13. def asJava[A](s: Seq[A]): List[A]
    Definition Classes
    AsJavaConverters
  14. def asJava[A](b: Buffer[A]): List[A]
    Definition Classes
    AsJavaConverters
  15. def asJava[A](i: Iterable[A]): Iterable[A]
    Definition Classes
    AsJavaConverters
  16. def asJava[A](i: Iterator[A]): Iterator[A]
    Definition Classes
    AsJavaConverters
  17. def asJavaCollection[A](i: Iterable[A]): Collection[A]
    Definition Classes
    AsJavaConverters
  18. def asJavaDictionary[K, V](m: Map[K, V]): Dictionary[K, V]
    Definition Classes
    AsJavaConverters
  19. def asJavaEnumeration[A](i: Iterator[A]): Enumeration[A]
    Definition Classes
    AsJavaConverters
  20. 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
  21. 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
  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  23. 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
  24. 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
  25. 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
  26. 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
  27. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def equals(other: Any): Boolean
    Definition Classes
    Aggregate → AnyRef → Any
  29. def facet(facets: Facet*): Aggregate
    Definition Classes
    Aggregate
  30. 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
  31. def fill(options: FillOptions, output: FillOutputField, outputs: FillOutputField*): Aggregate
    Definition Classes
    Aggregate
  32. 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
  33. 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
  34. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  35. 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
  36. 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
  37. def hashCode(): Int
    Definition Classes
    Aggregate → AnyRef → Any
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. def search(collector: SearchCollector): Aggregate
    Definition Classes
    Aggregate
  53. 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
  54. def search(operator: SearchOperator): Aggregate
    Definition Classes
    Aggregate
  55. 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
  56. def searchMeta(collector: SearchCollector): Aggregate
    Definition Classes
    Aggregate
  57. 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
  58. def searchMeta(operator: SearchOperator): Aggregate
    Definition Classes
    Aggregate
  59. 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
  60. def set[TExpression](field: (String, TExpression), fields: (String, TExpression)*): Aggregate
    Definition Classes
    Aggregate
  61. 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
  62. 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
  63. 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
  64. 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
  65. 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
  66. 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
  67. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  68. def toString(): String
    Definition Classes
    Aggregate → AnyRef → Any
  69. 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
  70. def unset(fields: String*): Aggregate
    Definition Classes
    Aggregate
  71. 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
  72. 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
  73. 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
  74. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  75. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  76. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Aggregate

Inherited from Serializable

Inherited from AsJava

Inherited from AsJavaConverters

Inherited from AnyRef

Inherited from Any

Ungrouped