MongoRepository documentation
IRepositoryManagerT, TKeyEnsureIndex Method (String) |
Ensures that the desired index exist and creates it if it doesn't exist.
Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
void EnsureIndex( string keyname )
Sub EnsureIndex ( keyname As String )
void EnsureIndex( String^ keyname )
abstract EnsureIndex : keyname : string -> unit
Parameters
- keyname
- Type: SystemString
The indexed field.
Remarks
This is a convenience method for EnsureIndexes(IMongoIndexKeys keys, IMongoIndexOptions options).
Index will be ascending order, non-unique, non-sparse.
See Also