For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

How to Index Fields in Objects and Documents

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.