kmongo / org.litote.kmongo.coroutine / CoroutineCollection / createIndexes

createIndexes

suspend fun createIndexes(indexes: List<IndexModel>, createIndexOptions: CreateIndexOptions = CreateIndexOptions()): List<String> (source)

Create multiple indexes.

Parameters

indexes - the list of indexes

createIndexOptions - options to use when creating indexes

Return
a list of elements indicating index creation operation completion

Mongodb
.driver.manual reference/command/createIndexes Create indexes

Mongodb
.server.release 2.6

Since
1.7

suspend fun createIndexes(clientSession: ClientSession, indexes: List<IndexModel>, createIndexOptions: CreateIndexOptions = CreateIndexOptions()): List<String> (source)

Create multiple indexes.

Parameters

clientSession - the client session with which to associate this operation

indexes - the list of indexes

createIndexOptions - options to use when creating indexes

Return
a list of elements indicating index creation operation completion

Mongodb
.driver.manual reference/command/createIndexes Create indexes

Mongodb
.server.release 3.6

Since
1.7