create Index
Creates an index.
Return
the name of the created index
Parameters
key
an object describing the index key(s), which may not be null.
abstract suspend fun createIndex(key: Bson, options: IndexOptions): String
Content copied to clipboard
Creates an index.
Return
the name of the created index
Parameters
key
an object describing the index key(s), which may not be null.
options
the options for the index
abstract suspend fun createIndex(clientSession: ClientSession, key: Bson): String
Content copied to clipboard
Creates an index.
Return
the name of the created index
Since
3.6
Parameters
client Session
the client session with which to associate this operation
key
an object describing the index key(s), which may not be null.
abstract suspend fun createIndex( clientSession: ClientSession, key: Bson, options: IndexOptions): String
Content copied to clipboard
Creates an index.
Return
the name of the created index
Since
3.6
Parameters
client Session
the client session with which to associate this operation
key
an object describing the index key(s), which may not be null.
options
the options for the index