I’m working with a time series object and have been able to insert and query records successfully. However, I’m struggling to filter records based on the timestamp
.
This is my test query:
{
"aggregation": [
{
"$match": {
"metadata.object": "object_1",
"timestamp": {"$gte": "2025-01-05T08:40:00.000Z" }
}
},
{
"$project": {
"temperature": 1,
"humidity": 1,
"timestamp": 1
}
},
{
"$skip": 0
},
{
"$limit": 20000
}
]
}
However, when I run this query, it returns no results. If I remove the timestamp
filter from the $match
, I do get data back. I also know that the timestamps in my data satisfy the provided condition.
How do i do this filtering correcty? Is there something I’m missing?