createSearchIndex

suspend fun createSearchIndex(indexName: String, definition: Bson): String

Create an Atlas Search index for the collection.

Return

the search index name.

Parameters

indexName

the name of the search index to create.

definition

the search index mapping definition.

See also


suspend fun createSearchIndex(definition: Bson): String

Create an Atlas Search index with default name for the collection.

Return

the search index name.

Parameters

definition

the search index mapping definition.

See also