-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.0.14
-
Component/s: None
-
None
-
Environment:OS: Ubuntu 24.04
node.js / npm versions: NA
Additional info: mongod version 7.0.14
-
ALL
-
Problem Statement/Rationale
Time based searches in timeseries collections are not providing expected results.
Please be sure to attach relevant logs with any sensitive data redacted.
How to retrieve logs for: Compass; Shell
Steps to Reproduce
Insert data into a timeseries collection, query it using $gt, $gte, and $eq operands.
Expected Results
Results should have been returned.
Actual Results
No documents were returned.
Additional Notes
```
testDB> db.TS_Stuff.count()
131553179
testDB> db.getCollectionInfos({name:'TS_Stuff'})
[
{
name:'TS_Stuff',
type:'timeseries',
options: {
timeseries:
},
info: { readOnly:false }
}
]
testDB> db.TS_Stuff.find({},{_id:0,t:1}).sort({t:-1}).limit(5)
[
,
{ t: ISODate('2024-07-24T14:32:16.000Z') },
{ t: ISODate('2024-07-24T14:32:16.000Z') },
{ t: ISODate('2024-07-24T14:32:14.000Z') },
{ t: ISODate('2024-07-24T14:32:14.000Z') }]
testDB> db.TS_Stuff.find({t:{$gte:ISODate('2024-07-24T14:32:16.000Z')}},{_id:0,t:1})
testDB> db.TS_Stuff.find({t:{$gt:ISODate('2024-07-24T14:32:16.000Z')}},{_id:0,t:1})
testDB> db.TS_Stuff.find({t:{$eq:ISODate('2024-07-24T14:32:16.000Z')}},{_id:0,t:1})
testDB> db.TS_Stuff.find({t:{$lt:ISODate('2024-07-24T14:32:16.000Z')}},{_id:0,t:1})
[
,
{ t: ISODate('2017-10-24T21:16:16.000Z') },
...17 entries
]
Type "it" for more
testDB> db.TS_Stuff.find({t:{$lte:ISODate('2024-07-24T14:32:16.000Z')}},{_id:0,t:1})
[
,
{ t: ISODate('2017-10-24T21:16:16.000Z') },
...17 entries
]
Type "it" for more```