Add hint support for MongoDB API functions
The "hint" option for Mongo Shell query/write operations is very useful when the Query Planner does not select the right index by default, or just to make sure the right index is used. When you cannot use the "Hide index" feature on the index selected by default, "hint" becomes the only way to have an efficient IXSCAN.
However, the "hint" feature does not exist on the MongoDB API functions (https://www.mongodb.com/docs/atlas/app-services/functions/mongodb/api/). This means that no command we can run inside a Trigger can specify a "hint" option.
I think that "hint" is a great "backup" feature for cases where the Query Planner selects the wrong index and you cannot afford to hide that index for some reason.
![](https://secure.gravatar.com/avatar/1ee20c6100604fe5060df4bb0fa5f6f8?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)