When you create a wildcard index in MongoDB, you have the option of specifying a single field, all fields, or just some.
You can use the wildcardProjection
parameter to include or exclude specific field paths from the wildcard index. This article presents an example of including specific fields in the wildcard index.