Method IndexExists
IndexExists(IMongoIndexKeys)
Tests whether an index exists.
public virtual bool IndexExists(IMongoIndexKeys keys)
Parameters
keys
IMongoIndexKeysThe indexed fields (usually an IndexKeysDocument or constructed using the IndexKeys builder).
Returns
- bool
True if the index exists.
IndexExists(params string[])
Tests whether an index exists.
public virtual bool IndexExists(params string[] keyNames)
Parameters
keyNames
string[]The names of the fields in the index.
Returns
- bool
True if the index exists.