vertx / io.vertx.kotlin.ext.mongo / io.vertx.ext.mongo.MongoClient / createIndexWithOptionsAwait

createIndexWithOptionsAwait

suspend fun MongoClient.createIndexWithOptionsAwait(collection: String, key: JsonObject, options: IndexOptions): Unit

Creates an index.

Parameters

collection - the collection

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.

options - the options for the index

resultHandler - will be called when complete

Return