-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.0
-
Component/s: Aggregation Framework
-
None
It's very usefull to have the current (server) datetime available in the Aggregation Framework. Also with the 3.4 view functionality.
For example i have a very large collection of documents, containing a datetime field, i have created a view which returns this is a nice way.
BUT what i want to see are the entries of the last month.
When i add a find to the view, the match stage is added as the last stage, but for pipeline performance you want to limit the amount of documents in the first stage.
There is no way to use the current data/time in the aggregation pipeline.
When you can place the current datetime in the pipeline document you can do everything
- duplicates
-
SERVER-23656 Current timestamp variable for aggregate expressions
- Closed