.NET Model of ECSedit

The Elastic.CommonSchema project contains a full C# representation of the Elastic Common Schema (ECS). The intention of this library is to form a reliable and correct basis for integrating into Elasticsearch, using both Microsoft .NET and ECS.

These types can be used either as-is or in conjunction with the Official .NET clients for Elasticsearch. The types are annotated with the corresponding DataMember attributes, enabling out-of-the-box serialization support with the Elasticsearch.net clients.


Add a reference to the Elastic.CommonSchema package:

<PackageReference Include="Elastic.CommonSchema" Version="8.6.0" />

Use Elastic.Ingest.Elasticsearch.CommonSchema to easily persist ECS documents to Elasticsearch or Elastic Cloud.


The version of the Elastic.CommonSchema package matches the published ECS version, with the same corresponding branch names:

The version numbers of the NuGet package must match the exact version of ECS used within Elasticsearch. Attempting to use mismatched versions, for example a NuGet package with version 1.2.0 against an Elasticsearch index configured to use an ECS template with version 1.1.0, will result in indexing and data problems.