On this page
You can also use the
objectId type to index:
Fields whose value is an array of
objectId. To learn more, see How to Index the Elements of an Array.
objectIdfields inside an array of documents indexed as the embeddedDocuments type.
If you enable dynamic mappings, Atlas Search
automatically indexes fields of type
objectId. You can
use the Visual Editor or the JSON Editor in the Atlas UI to
index fields as the
To define the index for the
objectId type, choose your preferred
configuration method in the Atlas UI and then select the
database and collection.
The Atlas Search
objectId type takes the following option:
UI Field Name
Human-readable label that identifies this field type. Value must be
The following index definition example uses the sample_mflix.comments 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.
The following example index definition indexes the
objectId data type to support queries against that field
using the Atlas Search equals operator.