# Mapped ip with type "ip" but getting mapping parsing error

**URL:** <https://discuss.elastic.co/t/mapped-ip-with-type-ip-but-getting-mapping-parsing-error/231981>\
**Category:** Elasticsearch\
**Created:** [May 11, 2020, 10:38am UTC](https://discuss.elastic.co/t/mapped-ip-with-type-ip-but-getting-mapping-parsing-error/231981 "2020-05-11T10:38:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IanCap](https://avatars.discourse-cdn.com/v4/letter/i/74df32/32.png) [@IanCap](https://discuss.elastic.co/u/IanCap)\
**Post date:** [May 11, 2020, 10:38am UTC](https://discuss.elastic.co/t/mapped-ip-with-type-ip-but-getting-mapping-parsing-error/231981/1 "2020-05-11T10:38:07Z")

</div>

Hi,

I'm currently trying to fix the following error :

```auto
index [log-2020-05-04], type [_doc], id [someid], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=object mapping for [ClientIP] tried to parse field [ClientIP] as object, but found a concrete value]]]

```

I noticed the ip had a "keyword" type. After some research i noticed all IPV6 addresses caused the issue, so i changed the ip field type to "ip" after following this link  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/ip.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/ip.html)

In modified the indexes tempates to match this - see at the bottom:

```auto
{
   "index_patterns" : [
      "log-*"
   ],
   "mappings" : {
         "properties": {
            "UserAgent": {
               "properties": {
                  "name": {
                     "type": "keyword"
                  },
                  "os_major": {
                     "type": "keyword"
                  },
                  "patch": {
                     "type": "keyword"
                  },
                  "os_name": {
                     "type": "text",
                     "fields": {
                        "keyword": {
                           "ignore_above": 256,
                           "type": "keyword"
                        }
                     }
                  },
                  "minor": {
                     "type": "keyword"
                  },
                  "device": {
                     "type": "keyword"
                  },
                  "os_minor": {
                     "type": "keyword"
                  },
                  "build": {
                     "type": "keyword"
                  },
                  "major": {
                     "type": "keyword"
                  },
                  "os": {
                     "type": "text",
                     "fields": {
                        "keyword": {
                           "type": "keyword",
                           "ignore_above": 256
                        }
                     }
                  }
               }
            },
            "WAFFlags": {
               "fields": {
                  "keyword": {
                     "type": "keyword",
                     "ignore_above": 256
                  }
               },
               "type": "text"
            },
            "ClientSSLProtocol": {
               "fields": {
                  "keyword": {
                     "ignore_above": 256,
                     "type": "keyword"
                  }
               },
               "type": "text"
            },
            "WAFRuleID": {
               "type": "text",
               "fields": {
                  "keyword": {
                     "ignore_above": 256,
                     "type": "keyword"
                  }
               }
            },
            "EdgeColoID": {
               "type": "long"
            },
            "ClientIP": {
               "properties": {
                  "ip": {
                     "type": "ip"
                  },

```

The new index i'm currently pushing the log files in have the correct mapping but i still get the error i gave at the beginning.

Any help would be much appreciated, if needed i'll give more informations regarding configurations,

Ian

---

<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:** [June 8, 2020, 10:38am UTC](https://discuss.elastic.co/t/mapped-ip-with-type-ip-but-getting-mapping-parsing-error/231981/2 "2020-06-08T10:38:11Z")

</div>

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