func (q *Query) Hint(indexKey ...string) *Query {
	q.m.Lock()
	keyInfo, err := parseIndexKey(indexKey)
	q.op.options.Hint = keyInfo.key
	q.op.hasOptions = true
	q.m.Unlock()
	if err != nil {
		panic(err)
	}
	return q
}
func (q *Query) Hint(indexKey ...string) *Query {
	q.m.Lock()
	keyInfo, err := parseIndexKey(indexKey)
	q.op.options.Hint = keyInfo.key
	q.op.hasOptions = true
	q.m.Unlock()
	if err != nil {
		panic(err)
	}
	return q
}
func ( q * Query ) Hint ( indexKey ... string ) * Query { q . m . Lock ( ) keyInfo , err := parseIndexKey ( indexKey ) q . op . options . Hint = keyInfo . key q . op . hasOptions = true q . m . Unlock ( ) if err != nil { panic ( err ) } return q }
// Hint will include an explicit "hint" in the query to force the server
// to use a specified index, potentially improving performance in some
// situations.  The provided parameters are the fields that compose the
// key of the index to be used.  For details on how the indexKey may be
// built, see the EnsureIndex method.
//
// For example:
//
//     query := collection.Find(bson.M{"firstname": "Joe", "lastname": "Winter"})
//     query.Hint("lastname", "firstname")
//
// Relevant documentation:
//
//     http://www.mongodb.org/display/DOCS/Optimization
//     http://www.mongodb.org/display/DOCS/Query+Optimizer
//
Hint will include an explicit hint in the query to force the server to use a specified index potentially improving performance in some situations . The provided parameters are the fields that compose the key of the index to be used . For details on how the indexKey may be built see the EnsureIndex method . For example : query : = collection . Find ( bson . M { firstname : Joe lastname : Winter } ) query . Hint ( lastname firstname ) Relevant documentation : http : // www . mongodb . org / display / DOCS / Optimization http : // www . mongodb . org / display / DOCS / Query + Optimizer