You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that, if you provide an input class as the first parameter to the `newAggregation` method, the `MongoTemplate` derives the name of the input collection from this class. Otherwise, if you do not not specify an input class, you must provide the name of the input collection explicitly. If both an input class and an input collection are provided, the latter takes precedence.
The MongoDB Aggregation Framework provides the following types of aggregation operations:
85
+
[TIP]
86
+
====
87
+
Unsupported aggregation stages (like https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/[$search] for MongoDB Atlas) can be provided by implementing either `AggregationOperation`.
88
+
`Aggregation.stage` is a shortcut for registering a pipeline stage by providing its JSON or `Bson` representation.
89
+
90
+
[source,java]
91
+
----
92
+
Aggregation.stage("""
93
+
{ $search : {
94
+
"near": {
95
+
"path": "released",
96
+
"origin": { "$date": { "$numberLong": "..." } } ,
97
+
"pivot": 7
98
+
}
99
+
}
100
+
}
101
+
""");
102
+
----
103
+
====
104
+
105
+
==== Aggregation Operators
58
106
59
-
* Pipeline Aggregation Operators
60
107
* Group/Accumulator Aggregation Operators
61
108
* Boolean Aggregation Operators
62
109
* Comparison Aggregation Operators
@@ -70,14 +117,11 @@ The MongoDB Aggregation Framework provides the following types of aggregation op
70
117
* Object Aggregation Operators
71
118
* Script Aggregation Operators
72
119
73
-
At the time of this writing, we provide support for the following Aggregation Operations in Spring Data MongoDB:
120
+
At the time of this writing, we provide support for the following Aggregation Operators in Spring Data MongoDB:
74
121
75
-
.Aggregation Operations currently supported by Spring Data MongoDB
122
+
.Aggregation Operators currently supported by Spring Data MongoDB
@@ -126,26 +170,6 @@ At the time of this writing, we provide support for the following Aggregation Op
126
170
127
171
Note that the aggregation operations not listed here are currently not supported by Spring Data MongoDB. Comparison aggregation operators are expressed as `Criteria` expressions.
128
172
129
-
[TIP]
130
-
====
131
-
Unsupported aggregation operations/operators (like https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/[$search] for MongoDB Atlas) can be provided by implementing either `AggregationOperation` or `AggregationExpression`.
132
-
`Aggregation.stage` is a shortcut for registering a pipeline stage by providing its JSON or `Bson` representation.
0 commit comments