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

XMLWordPrintableJSON

    • 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

              Assignee:
              Joel Redman (Inactive)
              Reporter:
              Stefan de Jong
              Votes:
              0 Vote for this issue
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: