Elastic.Ingest.Elasticsearch
0.37.0
Prefix Reserved
dotnet add package Elastic.Ingest.Elasticsearch --version 0.37.0
NuGet\Install-Package Elastic.Ingest.Elasticsearch -Version 0.37.0
<PackageReference Include="Elastic.Ingest.Elasticsearch" Version="0.37.0" />
<PackageVersion Include="Elastic.Ingest.Elasticsearch" Version="0.37.0" />
<PackageReference Include="Elastic.Ingest.Elasticsearch" />
paket add Elastic.Ingest.Elasticsearch --version 0.37.0
#r "nuget: Elastic.Ingest.Elasticsearch, 0.37.0"
#:package Elastic.Ingest.Elasticsearch@0.37.0
#addin nuget:?package=Elastic.Ingest.Elasticsearch&version=0.37.0
#tool nuget:?package=Elastic.Ingest.Elasticsearch&version=0.37.0
Elastic.Ingest.Elasticsearch
Production-ready bulk ingestion into Elasticsearch — batching, backpressure, retries, and index management handled for you.
Install
dotnet add package Elastic.Ingest.Elasticsearch
Quick start
1. Define a document with mapping attributes:
public class Product
{
[Keyword]
public string Sku { get; set; }
[Text]
public string Name { get; set; }
[Keyword]
public string Category { get; set; }
}
2. Declare a mapping context:
[ElasticsearchMappingContext]
[Index<Product>(Name = "products")]
public static partial class MyContext;
3. Create a channel, bootstrap, and write:
var options = new IngestChannelOptions<Product>(transport, MyContext.Product.Context);
using var channel = new IngestChannel<Product>(options);
await channel.BootstrapElasticsearchAsync(BootstrapMethod.Failure);
foreach (var product in products)
channel.TryWrite(product);
await channel.WaitForDrainAsync(TimeSpan.FromSeconds(10), ctx);
From [Index<Product>] the channel infers: target an index named products, create component and index templates, use index bulk operations, and create a new index on each bootstrap.
Strategies
When you need more control, use the IngestStrategies and BootstrapStrategies factory methods:
// Data stream with 30-day retention
var strategy = IngestStrategies.DataStream<LogEntry>(context, "30d");
var options = new IngestChannelOptions<LogEntry>(transport, strategy, context);
// Data stream with ILM policy
var strategy = IngestStrategies.DataStream<LogEntry>(context,
BootstrapStrategies.DataStreamWithIlm("logs-policy", hotMaxAge: "7d", deleteMinAge: "90d"));
// Index with ILM policy
var strategy = IngestStrategies.Index<Product>(context,
BootstrapStrategies.IndexWithIlm("products-policy"));
Helper APIs
Beyond channel-based bulk ingest, the library provides helper APIs for common Elasticsearch operations.
All helpers accept an ITransport instance and yield IAsyncEnumerable streams for progress monitoring.
PointInTimeSearch<T>— iterate all documents in an index using PIT withsearch_afterpaginationServerReindex— start a server-side_reindexand poll until completionDeleteByQuery— start a_delete_by_queryand poll until completionClientReindex<T>— read from a source index via PIT search and write to a destinationIngestChannel
// Example: PIT search
var search = new PointInTimeSearch<MyDoc>(transport, new() { Index = "my-index" });
await foreach (var page in search.SearchPagesAsync())
Console.WriteLine($"Got {page.Documents.Count} docs");
// Example: Server reindex
var reindex = new ServerReindex(transport, new() { Source = "old", Destination = "new" });
await foreach (var progress in reindex.MonitorAsync())
Console.WriteLine($"{progress.FractionComplete:P0}");
Documentation
Full documentation: https://elastic.github.io/elastic-ingest-dotnet/
Legacy channels
DataStreamChannel<> and IndexChannel<> still exist for backward compatibility but IngestChannel<T> with composable strategies is the recommended API for all new code.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Elastic.Ingest.Transport (>= 0.37.0)
- Elastic.Mapping (>= 0.37.0)
-
.NETStandard 2.1
- Elastic.Ingest.Transport (>= 0.37.0)
- Elastic.Mapping (>= 0.37.0)
-
net10.0
- Elastic.Ingest.Transport (>= 0.37.0)
- Elastic.Mapping (>= 0.37.0)
-
net8.0
- Elastic.Ingest.Transport (>= 0.37.0)
- Elastic.Mapping (>= 0.37.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Elastic.Ingest.Elasticsearch:
| Package | Downloads |
|---|---|
|
Elastic.Ingest.Elasticsearch.CommonSchema
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.37.0 | 439 | 3/5/2026 |
| 0.36.0 | 117 | 3/5/2026 |
| 0.35.0 | 127 | 3/5/2026 |
| 0.34.5 | 3,304 | 3/3/2026 |
| 0.34.4 | 119 | 3/3/2026 |
| 0.34.3 | 131 | 3/3/2026 |
| 0.34.2 | 135 | 3/3/2026 |
| 0.34.1 | 121 | 3/3/2026 |
| 0.34.0 | 120 | 3/3/2026 |
| 0.33.0 | 139 | 3/3/2026 |
| 0.32.0 | 147 | 3/2/2026 |
| 0.31.0 | 130 | 3/2/2026 |
| 0.30.0 | 273 | 2/26/2026 |
| 0.29.0 | 244 | 2/24/2026 |
| 0.28.0 | 147 | 2/24/2026 |
| 0.27.0 | 220 | 2/23/2026 |
| 0.26.0 | 139 | 2/23/2026 |
| 0.25.0 | 133 | 2/23/2026 |
| 0.24.0 | 260 | 2/22/2026 |
| 0.23.0 | 137 | 2/22/2026 |