# Elasticsearch 7.3.0 - Mapping Specific Fields

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-3-0-mapping-specific-fields/195926>\
**Category:** Elasticsearch\
**Created:** [August 20, 2019, 12:21pm UTC](https://discuss.elastic.co/t/elasticsearch-7-3-0-mapping-specific-fields/195926 "2019-08-20T12:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaqFanClub](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@ShaqFanClub](https://discuss.elastic.co/u/ShaqFanClub)\
**Post date:** [August 20, 2019, 12:21pm UTC](https://discuss.elastic.co/t/elasticsearch-7-3-0-mapping-specific-fields/195926/1 "2019-08-20T12:21:08Z")

</div>

Hello,

I may be missing this in the documentation, so forgive me.

I want a template that specifies a handful of fields so unwanted fields aren't indexed, in order to save disk space. However, I don't want to explicitly define types for those fields; I just want the default types.

Is there a way to accomplish this?

Thanks

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 21, 2019, 7:20am UTC](https://discuss.elastic.co/t/elasticsearch-7-3-0-mapping-specific-fields/195926/2 "2019-08-21T07:20:10Z")

</div>

Hey,

there is not a way to do is, because it is still unsafe. Imagine you had this possibility in combination with dailiy indices. On day 1 the first document contains a `1` as a number (possibly resulting in a short), and on day 2 the first document contains a `3458345643` (an int) and on day 3 it will be `abcdef` ending up in a string. You would again end up with an arbitrary mapping, just within the limitation of known fields.

If I was responsible for that cluster, I would just go with a solid preconfigured mapping and then decide what to do with unknown fields: either ignoring them or throwing an exception on indexation.

Hope this helps!

---

<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:** [September 18, 2019, 7:20am UTC](https://discuss.elastic.co/t/elasticsearch-7-3-0-mapping-specific-fields/195926/3 "2019-09-18T07:20:23Z")

</div>

Closed on September 18, 2019, 7:20am UTC

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