MongoRepository documentation
MongoRepositoryManagerT, TKeyEnsureIndexes Method (IEnumerableString) |
Ensures that the desired indexes exist and creates them if they don't exist.
Namespace: MongoRepository
Assembly: MongoRepository.Net45 (in MongoRepository.Net45.dll) Version: 1.6.11.0 (1.6.11.0)
Syntax
public virtual void EnsureIndexes( IEnumerable<string> keynames )
Public Overridable Sub EnsureIndexes ( keynames As IEnumerable(Of String) )
public: virtual void EnsureIndexes( IEnumerable<String^>^ keynames )
abstract EnsureIndexes : keynames : IEnumerable<string> -> unit override EnsureIndexes : keynames : IEnumerable<string> -> unit
Parameters
- keynames
- Type: System.Collections.GenericIEnumerableString
The indexed fields.
Implements
IRepositoryManagerT, TKeyEnsureIndexes(IEnumerableString)Remarks
This is a convenience method for EnsureIndexes(IMongoIndexKeys keys, IMongoIndexOptions options).
Index will be ascending order, non-unique, non-sparse.
See Also