# Map only specific fields to save space

**URL:** <https://discuss.elastic.co/t/map-only-specific-fields-to-save-space/217157>\
**Category:** Elasticsearch\
**Created:** [January 30, 2020, 10:33am UTC](https://discuss.elastic.co/t/map-only-specific-fields-to-save-space/217157 "2020-01-30T10:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias\_Eriksson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tobias_eriksson/32/61713_2.png) [@Tobias\_Eriksson](https://discuss.elastic.co/u/Tobias_Eriksson)\
**Post date:** [January 30, 2020, 10:33am UTC](https://discuss.elastic.co/t/map-only-specific-fields-to-save-space/217157/1 "2020-01-30T10:33:21Z")

</div>

I would like to map only 5 or so fields in the incoming data, the rest I do not care about  
How would my mapping look like then ?  
Right now it looks like this:

> PUT /\_template/tobias2-all-audit  
> {  
> "order" : 0,  
> "version" : 60001,  
> "index\_patterns" : [  
> "tobias2-all-audit-\*"  
> ],  
> "settings" : {  
> "index" : {  
> "lifecycle" : {  
> "name" : "audit\_policy",  
> "rollover\_alias" : "all-audit"  
> },  
> "number\_of\_shards" : "1",  
> "refresh\_interval" : "5s"  
> }  
> },  
> "mappings" : {  
> "properties" : {  
> "@timestamp" : {  
> "type" : "date"  
> },  
> "measured\_time" : {  
> "type" : "long"  
> },  
> "severity" : {  
> "type" : "long"  
> },  
> "@version" : {  
> "type" : "keyword"  
> },  
> "message" : {  
> "type" : "text"  
> },  
> "service\_name" : {  
> "type" : "text"  
> },  
> "method" : {  
> "type" : "text"  
> }  
> }  
> },  
> "aliases" : { }  
> }

---

<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:** [February 27, 2020, 10:33am UTC](https://discuss.elastic.co/t/map-only-specific-fields-to-save-space/217157/2 "2020-02-27T10:33:25Z")

</div>

Closed on February 27, 2020, 10:33am UTC

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