I have this document Scheme: use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
/**
* @MongoDB\Document(collection="users") *
*/
class Markers
{
/**
* @MongoDB\Id
*/
protected $id;
/**
* @MongoDB\Float
*/
protected $lat;
/**
* @MongoDB\Float
*/
protected $lng;
/**
* @MongoDB\String
*/
protected $title;
}
What I want is having index on $title field and $lat and $lng how do you suggest I should work this out ? Do I have to tell the document that these fields are indexes or , running the command in Mongo shell is sufficient ? Thanks !