DATE criteria field types and formats
Parent: DATE Criteria · Published reference · snapshot 2026-10-15 · viability 2.95 / 5 (skip)
↓ Facts as markdownall context files
Depth-first rabbithole dossier for DATE criteria field types and formats; source-anchored research pack.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Definitions
- [high] The `date_field` parameter in the criteria is a string that specifies the date field based on which documents are archived. Sources: https://www.mongodb.com/docs/atlas/online-archive/manage-online-archive.md, https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go [source]
How it works
- [low] The criteria type can be "DATE" or "CUSTOM", and the criteria field is conditional, not required when the type is equal to CUSTOM. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go [source]
- [low] The `query` field in the criteria is a string that specifies the custom query for archiving when the criteria type is CUSTOM. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go [source]
Problems, failure modes and limitations
- [high] For date-based archives, you must index the date field, but you do not need to create a separate index if the date time field is part of a compound index. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md, https://www.mongodb.com/community/forums/t/sort-exceeded-memory-limit-of-104857600-bytes/269787 [source]
- [low] As long as the date time field is one of the fields in a compound index, you should not receive an index sufficiency error for online archive. Sources: https://www.mongodb.com/community/forums/t/sort-exceeded-memory-limit-of-104857600-bytes/269787 [source]
- [low] You will only receive an index sufficiency error if there are no indexes or compound indexes that contain the date time field. Sources: https://www.mongodb.com/community/forums/t/sort-exceeded-memory-limit-of-104857600-bytes/269787 [source]
- [low] If the `date_field` value does not exist in the collection, the online archive state remains pending forever, and the field cannot be updated, requiring a destroy to resolve the `ONLINE_ARCHIVE_CANNOT_MODIFY_FIELD` error. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/docs/resources/online_archive.md [source]
- [low] An error starting the archive with the message "Invalid criteria field type field name: event.expiration_at_ms, detected field type: double" indicates a mismatch in the criteria field type. Sources: https://mongodb.com/community/forums/t/online-archive-epoch-millis-in-a-field-type-double/220516 [source]
Facts and statements
- [low] Atlas supports the following partition attribute types for date criteria: `date`, `double`, `int`, `long`, `objectId`, `string`, and `boolean`. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md [source]
- [high] Valid values for the partition field type in MongoDB Cloud are `date`, `int`, `long`, `objectId`, `string`, and `uuid`. Sources: 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]
- [low] The `date_format` field in the criteria is optional and computed, with the API setting the default value if not specified. Sources: https://raw.githubusercontent.com/mongodb/terraform-provider-mongodbatlas/master/internal/service/onlinearchive/resource.go [source]
- [low] The value of a partition field can be up to a maximum of 700 characters, and documents with values exceeding 700 characters are not archived. Sources: https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ [source]
- [low] Atlas determines the data type of a partition field by sampling 10 documents from the collection and will not archive a document if the specified field value does not match values in other documents in the same collection. Sources: https://www.mongodb.com/docs/atlas/online-archive/configure-online-archive-standard.md [source]
- [low] The sequence in which MongoDB Cloud slices the collection data to create partitions starts with zero, and the value of the criteria.dateField parameter defaults as the first item in the partition sequence. Sources: https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ [source]
- Fact 5 lists `double` and `boolean` as supported partition attribute types, while Fact 79 and 99 list `uuid` but omit `double` and `boolean`. 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, https://www.pulumi.com/registry/packages/mongodbatlas/api-docs/onlinearchive/ [source]
Related concepts
- field — is a part of DATE criteria field types and formats
- and — is a part of DATE criteria field types and formats
- DATE — is a part of DATE criteria field types and formats
- criteria — is a part of DATE criteria field types and formats
- types — is a part of DATE criteria field types and formats
Children
- No children recorded.