yii\mongodb\Command::dropIndexes PHP Method

dropIndexes() public method

Drops collection indexes by name.
public dropIndexes ( string $collectionName, string $indexes ) : array
$collectionName string collection name.
$indexes string wildcard for name of the indexes to be dropped.
return array result data.
    public function dropIndexes($collectionName, $indexes)
    {
        $this->document = $this->db->getQueryBuilder()->dropIndexes($collectionName, $indexes);
        return current($this->execute()->toArray());
    }