Loading

.NET

Rapidly develop applications with the .NET client for Elasticsearch.

Designed for .NET application developers, the .NET language client library provides a strongly typed API and query DSL for interacting with Elasticsearch. The .NET client includes higher-level abstractions, such as helpers for coordinating bulk indexing and update operations. It also comes with built-in, configurable cluster failover retry mechanisms.

The Elasticsearch .NET client is available as a NuGet package

  • One-to-one mapping with the REST API.
  • Strongly typed requests and responses for Elasticsearch APIs.
  • Fluent API for building requests.
  • Query DSL to assist with constructing search queries.
  • Helpers for common tasks such as bulk indexing of documents.
  • Pluggable serialization of requests and responses based on System.Text.Json.
  • Diagnostics, auditing, and .NET activity integration.

The .NET Elasticsearch client is built on the Elastic Transport library, which provides:

  • Connection management and load balancing across all available nodes.
  • Request retries and dead connections handling.

Language clients are forward compatible:

Given a constant major version of the client, each related minor version is compatible with its equivalent- and all later Elasticsearch minor versions of the same or next higher major version.

For example:

Client Version Compatible with Elasticsearch 8.x Compatible with Elasticsearch 9.x Compatible with Elasticsearch 10.x
9.x ❌ no ✅ yes ✅ yes
8.x ✅ yes ✅ yes ❌ no

Language clients are also backward compatible across minor versions within the same major version (without strong guarantees), but never backward compatible with earlier Elasticsearch major versions.

Note

Compatibility does not imply feature parity. For example, an 8.12 client is compatible with 8.13, but does not support any of the new features introduced in Elasticsearch 8.13.

To submit a bug report or feature request, use GitHub issues.

For more general questions and comments, try the community forum on discuss.elastic.co. Mention .NET in the title to indicate the discussion topic.