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

Filtering timeseries with date-field does not include results from before 1970

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.0.7
    • 6.2.0-rc0, 6.0.5, 5.0.16
    • None
    • Fully Compatible
    • ALL
    • v6.0, v5.0
    • Hide
      • Create a time-series collection
      • Insert records before and after epoch
      • Query for documents with filter: { $timeField: { $lt: "arbitrary date > 1970" }

        }

      • Results will only include documents after epoch

       

      If you query with { $timeField:

      { $lt: "arbitrary date < 1970" }

      }, the documents missing from the previous set will suddenly show up.

      Show
      Create a time-series collection Insert records before and after epoch Query for documents with filter: { $timeField: { $lt: "arbitrary date > 1970" } } Results will only include documents after epoch   If you query with { $timeField: { $lt: "arbitrary date < 1970" } }, the documents missing from the previous set will suddenly show up.
    • QO 2022-09-19, QO 2022-10-03

    Description

      db['test-array-ts'].countDocuments({
        date: { $lt: ISODate('1970-01-01T18:31:22.000+00:00') }
      })
      result: 149

      db['test-array-ts'].countDocuments({
        date: { $lt: ISODate('1965-01-01T18:31:22.000+00:00') }
      })
      result: 1989943

      Attachments

        Issue Links

          Activity

            People

              joel.redman@mongodb.com Joel Redman (Inactive)
              steve25070@gmail.com Stefan de Jong
              Votes:
              0 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: