createIndexes() public method
Creates indexes in the collection.
public boolean createIndexes ( $collectionName, $indexes ) | ||
---|---|---|
$collectionName | string |
Collection name. |
$indexes | array[] |
Indexes specification. Each specification should be an array in format: optionName => value The main options are:
See [[https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#options-for-all-index-types]] for the full list of options. |
return | boolean |
Whether operation was successful. |
Please login to continue.