# ECS Format and Index Mappings

**URL:** https://discuss.elastic.co/t/ecs-format-and-index-mappings/336740
**Category:** Elasticsearch
**Tags:** ecs-elastic-common-schema, ilm-index-lifecycle-management, datastreams
**Created:** [June 23, 2023, 6:42am UTC](https://discuss.elastic.co/t/ecs-format-and-index-mappings/336740 "2023-06-23T06:42:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lxk3](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@lxk3](https://discuss.elastic.co/u/lxk3)
#### Post date: [June 23, 2023, 6:42am UTC](https://discuss.elastic.co/t/ecs-format-and-index-mappings/336740/1 "2023-06-23T06:42:53Z")

</div>

Hello there,

we want to use the ECS log format for our new applications. We already use datastreams with index templates and predefined mappings and I was wondering if we need to write a new mapping for ECS or if there is an existing mapping for all ECS fields that can be used?

On the other hand: Is it even necessary to provide a mapping for ECS or does elasticsearch detect it "automagically" if there is a field with "ecs.version"?

Glad for any help or advice! Thanks!

---

<div class="post-metadata">

### Author: ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)
#### Post date: [June 23, 2023, 1:59pm UTC](https://discuss.elastic.co/t/ecs-format-and-index-mappings/336740/2 "2023-06-23T13:59:57Z")

</div>

We have [mappings](https://github.com/elastic/elastic-package/blob/e0b94d0a44d312b5a92dadc9043675eedd73e1cd/internal/builder/_static/ecs_mappings.yaml) that can be used to dynamically map data to ECS. You would create an index template from it containing the mappings and then apply that to your data streams.

> [@lxk3](#):
>
> Is it even necessary to provide a mapping for ECS or does elasticsearch detect it "automagically"

There has been some discussion of this but it hasn't happened yet. [Optionally use ECS conventions for dynamic mappings · Issue #85692 · elastic/elasticsearch · GitHub](https://github.com/elastic/elasticsearch/issues/85692)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 21, 2023, 2:00pm UTC](https://discuss.elastic.co/t/ecs-format-and-index-mappings/336740/3 "2023-07-21T14:00:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
