createIndexes() public method (available since version 2.1)
Creates several indexes at once. Example: $collection = Yii::$app->mongo->getCollection('customer');
$collection->createIndexes([
[
'key' => ['name'],
],
[
'key' => [
'email' => 1,
'address' => -1,
],
'name' => 'my_index'
],
]);
public boolean createIndexes ( $indexes )$indexes
array[]
Indexes specification. Each specification shoul