Use the MongoDB Search document field type to index fields in objects or subdocuments. When you enable dynamic mappings on a document type field, MongoDB Search automatically indexes all dynamically indexable field types nested within that field. You can also configure static mappings to index only specific nested field types.