<!-- llms-explorer concept facts · https://llms-explorer.com/tree/date-vs-custom-criteria-selection/ · pack 2026-10-15 · ~1412 tokens -->

# DATE vs CUSTOM criteria selection

> Depth-first rabbithole dossier for DATE vs CUSTOM criteria selection; source-anchored research pack.

Parent: [DATE Criteria](https://llms-explorer.com/tree/date-criteria/) · 3 facets · 10 facts · page: https://llms-explorer.com/tree/date-vs-custom-criteria-selection/

## How it works

- [low] Custom filters are useful when data coldness is not purely based on age, such as when status is in terminal states and a closedAt field is old enough. Sources: https://dev.to/dvorlandi/atlas-online-archive-for-large-collections-keep-hot-data-hot-33fm — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#patterns`

## Problems, failure modes and limitations

- [low] You cannot modify the archiving criteria from DATE to CUSTOM or vice versa once the online archive is created. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [low] To edit DATE criteria, modify the number of days Atlas stores data on the active cluster in the Archival Age Limit section. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [high] Custom queries do not support JavaScript expressions, and you cannot pass an empty document {} to return all documents. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`

## Facts and statements

- [high] Atlas Online Archive supports two criteria types: DATE, which selects documents based on a date field and retention period, and CUSTOM, which selects documents using a custom JSON query. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go, https: — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [medium] For DATE criteria, Atlas archives documents once the current date exceeds the value of the date field plus the configured number of days (the overview describes this as subtracting the number of days from the current time and archiving data older than that point). Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [high] For CUSTOM criteria, Atlas runs the specified JSON query using the db.collection.find(query) command to select documents for archiving. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/docs/atlas/online-archive/overview.md, https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [low] To edit CUSTOM criteria, enter a valid JSON filter to select the documents for archiving. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [low] For DATE-based rules, you can choose up to 3 partitioning keys in total, including the date field; for CUSTOM rules, you can choose up to 2 partitioning keys. Sources: https://www.mongodb.com/community/forums/t/atlas-online-archive-partition-based-on-timestamp/195506 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#core`
- [high] The date field for DATE criteria is immutable once the online archive is created; if the date field value does not exist in the collection, the archive state remains pending forever and requires destruction to change. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/date-vs-custom-criteria-selection-123ee64404/rabbithole-synthesis.md#troubleshooting`

## Related concepts

- CUSTOM — is a part of DATE vs CUSTOM criteria selection
- criteria — is a part of DATE vs CUSTOM criteria selection
- DATE — is a part of DATE vs CUSTOM criteria selection
