MongoCursor
PHP Manual

MongoCursor::hint

(PECL mongo >=0.9.0)

MongoCursor::hintGives the database a hint about the query

说明

public MongoCursor MongoCursor::hint ( array $key_pattern )

参数

key_pattern

Indexes to use for the query.

返回值

Returns this cursor.

错误/异常

Throws MongoCursorException if this cursor has started iterating.


MongoCursor
PHP Manual