Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29193

Current date/time available in Aggregation pipeline

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 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

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            dennis@hoefakkr.nl Dennis Hoefakker
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: