Online Archive
Hi Team - With regards to Atlas Data lake and using Online Archive customer request to be able to have (Time + Query) i.e. anything that is older than 60 days that match X query.
4
votes
![](https://secure.gravatar.com/avatar/a41aa1d3035494b8c3c197a65109a6e3?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
AdminBenjamin (Admin, MongoDB) commented
This can actually be done today using $expr, here's an example where the magic number is just the number of days in milliseconds
{
"archive": true,
"$expr": {
"$lte": [
"$bucket_end_date",
{
"$subtract": [ "$$NOW", 146880000000 ] }
]
}
}