# How to map to ES type "ip" properly?

**URL:** <https://discuss.elastic.co/t/how-to-map-to-es-type-ip-properly/156260>\
**Category:** Elasticsearch\
**Created:** [November 12, 2018, 9:26am UTC](https://discuss.elastic.co/t/how-to-map-to-es-type-ip-properly/156260 "2018-11-12T09:26:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jahlives](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jahlives](https://discuss.elastic.co/u/jahlives)\
**Post date:** [November 12, 2018, 9:26am UTC](https://discuss.elastic.co/t/how-to-map-to-es-type-ip-properly/156260/1 "2018-11-12T09:26:29Z")

</div>

Hello

use logstash+elasticsearch+kibana all in version 6.4 on a Centos7 with latest updates

I have an issue with a mapping for ip-type in elasticsearch. I read that this cannot be done via convert in logstash and has to be applied by a logstash template to elasticsearch.  
So I set a mapping in the respective template file like

> "clientip":{  
> "type":"ip"  
> },

and restarted logstash.  
After checking the index today I saw that clientip is still considered text by elasticsearch

> "clientip":{"type":"text","fields":{"keyword":{"type":"keyword","ignore\_above":256}}}

So how can it be achieved that this field is considered of type ip?  
Or is this any issue because that field formerly was of type string before I wanted to change it to ip?

Thanks for any help

tobi

---

<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:** [December 10, 2018, 9:30am UTC](https://discuss.elastic.co/t/how-to-map-to-es-type-ip-properly/156260/2 "2018-12-10T09:30:23Z")

</div>

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