hint property

String? hint
getter/setter pair

Optional. Index specification. Specify either the index name as a string (hint field) or the index key pattern (hintDocument field). If specified, then the query system will only consider plans using the hinted index. starting in MongoDB 4.2, with the following exception, hint is required if the command includes the min and/or max fields; hint is not required with min and/or max if the filter is an equality condition on the _id field { _id:

Implementation

String? hint;