On this page
You can use the Atlas Search
dateFacet type for indexing date values for
Atlas Search only supports facet queries against fields
indexed as the
dateFacet type. To perform a normal search also
on the same field, you must index the field as type date also.
Atlas Search doesn't dynamically index
date values for faceting. You must use static
mappings to index date values for
faceting. You can use the Visual Editor or the JSON Editor in
the Atlas UI to index date fields as the
The following limitations apply:
You can't index a date field for faceting if it's inside an array or if it's inside a document in an array.
Atlas Search doesn't support date faceting over fields indexed as part of an
To define the index for the
dateFacet type, choose your preferred
configuration method in the Atlas UI and then select the
database and collection.
The Atlas Search
dateFacet type takes the following parameter:
UI Field Name
Human-readable label that identifies this field type. Value must be
The following index definition example uses the sample_mflix.movies collection. If you have the sample data already loaded on your cluster, you can use the Visual Editor or JSON Editor in the Atlas UI to configure the index. After you select your preferred configuration method, select the database and collection, and refine your index to add field mappings.