suspend fun MongoClient.createIndexAwait(collection: String, key: JsonObject): Unit
Creates an index.
key
- A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
resultHandler
- will be called when complete
Return