Sokil\Mongo\Collection::createIndex PHP Method

createIndex() public method

Create index
public createIndex ( array $key, array $options = [] ) : Collection
$key array
$options array see @link http://php.net/manual/en/mongocollection.ensureindex.php
return Collection
    public function createIndex(array $key, array $options = array())
    {
        $this->getMongoCollection()->createIndex($key, $options);
        return $this;
    }