MongoCollection.createIndex
string createIndex(T)(T keys,
IndexOptions indexOptions = IndexOptions.init,
CreateIndexOptions options = CreateIndexOptions.init) if (!is(Unqual!T == IndexModel)) @safeConvenience method for creating a single index. Calls createIndexes
Supports any kind of document for template parameter T or a IndexModel.
Parameters
keys | a IndexModel or type with integer or string fields indicating index direction or index type. |
string createIndex(const IndexModel keys,
CreateIndexOptions options = CreateIndexOptions.init) @safeditto