Method CreateMany
CreateMany(IEnumerable<CreateIndexModel<TDocument>>, CancellationToken)
Creates multiple indexes.
public virtual IEnumerable<string> CreateMany(IEnumerable<CreateIndexModel<TDocument>> models, CancellationToken cancellationToken = default)
Parameters
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IEnumerable<string>
An IEnumerable<T> of the names of the indexes that were created.
CreateMany(IEnumerable<CreateIndexModel<TDocument>>, CreateManyIndexesOptions, CancellationToken)
Creates multiple indexes.
public virtual IEnumerable<string> CreateMany(IEnumerable<CreateIndexModel<TDocument>> models, CreateManyIndexesOptions options, CancellationToken cancellationToken = default)
Parameters
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
options
CreateManyIndexesOptionsThe options for create multiple indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IEnumerable<string>
An IEnumerable<T> of the names of the indexes that were created.
CreateMany(IClientSessionHandle, IEnumerable<CreateIndexModel<TDocument>>, CancellationToken)
Creates multiple indexes.
public virtual IEnumerable<string> CreateMany(IClientSessionHandle session, IEnumerable<CreateIndexModel<TDocument>> models, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IEnumerable<string>
An IEnumerable<T> of the names of the indexes that were created.
CreateMany(IClientSessionHandle, IEnumerable<CreateIndexModel<TDocument>>, CreateManyIndexesOptions, CancellationToken)
Creates multiple indexes.
public virtual IEnumerable<string> CreateMany(IClientSessionHandle session, IEnumerable<CreateIndexModel<TDocument>> models, CreateManyIndexesOptions options, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
options
CreateManyIndexesOptionsThe options for create multiple indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IEnumerable<string>
An IEnumerable<T> of the names of the indexes that were created.