Method RunAsync
RunAsync(IngestionSource, string?, IngestionRunOptions?, CancellationToken)
Runs one source into one collection.
Task<IngestionRunResult> RunAsync(IngestionSource source, string? collectionName = null, IngestionRunOptions? options = null, CancellationToken cancellationToken = default)
Parameters
sourceIngestionSourceWhere the documents come from.
collectionNamestringNull resolves to the single configured collection; an unknown name, or null with more than one configured collection, is IngestionCollectionNotConfigured (6002) before any enumeration, any open and any write.
optionsIngestionRunOptionsPer-run overrides. Null takes every default.
cancellationTokenCancellationTokenCancels the run on a committed boundary.
Returns
- Task<IngestionRunResult>
The run's counters and per-document results.
RunAsync(IngestionSource, IProgress<IngestionProgress>, CancellationToken)
The progress-reporting convenience overload.
Task<IngestionRunResult> RunAsync(IngestionSource source, IProgress<IngestionProgress> progress, CancellationToken cancellationToken = default)
Parameters
sourceIngestionSourceWhere the documents come from.
progressIProgress<IngestionProgress>Invoked at most once per 100 ms plus once per document boundary.
cancellationTokenCancellationTokenCancels the run on a committed boundary.
Returns
- Task<IngestionRunResult>
The run's counters and per-document results.