# Properties overlap templates?

**URL:** <https://discuss.elastic.co/t/properties-overlap-templates/81040>\
**Category:** Elasticsearch\
**Created:** [April 3, 2017, 6:05pm UTC](https://discuss.elastic.co/t/properties-overlap-templates/81040 "2017-04-03T18:05:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Ian](https://avatars.discourse-cdn.com/v4/letter/_/ccd318/32.png) [@\_Ian](https://discuss.elastic.co/u/_Ian)\
**Post date:** [April 3, 2017, 6:05pm UTC](https://discuss.elastic.co/t/properties-overlap-templates/81040/1 "2017-04-03T18:05:40Z")

</div>

If I have a property which is the same across multiple document types in an index, can I define that property more globally?

Example: If I have a field "id\_orig.h" which is type IP, can I save on template space by defining it once?  
Example config:

```
{
    "template" : "global*",
    "settings" : {
        "number_of_shards": 5
    },
    "mappings" : {
        "global-alpha" : {
            "_source" : { "enabled" : true },
            "_all" : {"enabled" : false },
            "properties" : {
                "ts" : { "type": "date", "format": "epoch_millis" },
                "uid" : { "type": "text" },
                "id.orig_h" : { "type": "ip" },
                "mac" : { "type": "keyword" }
            }
        },
        "global-bravo" : {
            "_source" : { "enabled" : true },
            "_all" : {"enabled" : false },
            "properties" : {
                "ts" : { "type": "date", "format": "epoch_millis" },
                "uid" : { "type": "text" },
                "id.orig_h" : { "type": "ip" },
                "proto" : { "type": "keyword" }
            }
        }
    }
}
```

---

<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:** [May 1, 2017, 6:05pm UTC](https://discuss.elastic.co/t/properties-overlap-templates/81040/2 "2017-05-01T18:05:54Z")

</div>

Closed on May 1, 2017, 6:05pm UTC

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