ensureIndex
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
Return
the index name
Parameters
an object describing the index key(s), which may not be null.
the options for the index
Create an ascending index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
Return
the index name
Parameters
the properties, which must contain at least one
the options for the index
Create an index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
Return
the index name
Parameters
the client session with which to associate this operation
an object describing the index key(s), which may not be null.
the options for the index
Create an ascending index with the given keys and options. If the creation of the index is not doable because an index with the same keys but with different IndexOptions already exists, then drop the existing index and create a new one.
Return
the index name
Parameters
the client session with which to associate this operation
the properties, which must contain at least one
the options for the index