# Mapping error

**URL:** <https://discuss.elastic.co/t/mapping-error/2577>\
**Category:** Elasticsearch\
**Created:** [June 12, 2015, 1:30pm UTC](https://discuss.elastic.co/t/mapping-error/2577 "2015-06-12T13:30:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahesh](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mahesh](https://discuss.elastic.co/u/mahesh)\
**Post date:** [June 12, 2015, 1:30pm UTC](https://discuss.elastic.co/t/mapping-error/2577/1 "2015-06-12T13:30:57Z")

</div>

Hi all,

This is my mapping.

curl [http://localhost:9200/indexname/\_mapping/log?pretty](http://localhost:9200/indexname/_mapping/log?pretty)  
{  
"fortigate" : {  
"mappings" : {  
"log" : {  
"properties" : {  
"@timestamp" : {  
"type" : "date",  
"format" : "dateOptionalTime"  
},  
"@version" : {  
"type" : "string"  
},

```
      "duration" : { 
        "type" : "string" 
      }, 
      "geoip" : { 
        "properties" : { 
          "area_code" : { 
            "type" : "long" 
          }, 
          
          **"location" : {** 
            **"type" : "double"** 
          **},** 
          "longitude" : { 
            "type" : "double" 
          }, 
          "postal_code" : { 
            "type" : "string" 
          }, 
          "real_region_name" : { 
            "type" : "string" 
          }, 
          "region_name" : { 
            "type" : "string" 
          }, 
          "timezone" : { 
            "type" : "string" 
          } 
        } 
      }, 
      "group" : { 
        "type" : "string" 
      }, 
      "host" : { 
        "type" : "string" 
      }, 
      "hostname" : { 
        "type" : "string" 
      }, 
      "identix" : { 
        "type" : "string" 
      }, 
      "level" : { 
        "type" : "string" 
      }, 
      "logid" : { 
        "type" : "string" 
      }, 
      "mastersrcmac" : { 
        "type" : "string" 
      }, 
      "message" : { 
        "type" : "string" 
      }, 
      "month" : { 
        "type" : "string" 
      }, 
      "osname" : { 
        "type" : "string" 
      }, 
      
      "vd" : { 
        "type" : "string" 
      }, 
      "year" : { 
        "type" : "string" 
      } 
    } 
  } 
} 

```

}  
}  
I want to change the 'location' field type into geo\_point under geoip.I tried to change by using following curl command.

curl -XPUT '[http://localhost:9200/fortigate/log/\_mapping](http://localhost:9200/fortigate/log/_mapping)' -d '  
{  
"geoip" : {  
"properties" : {  
"location" : {"type" : "geo\_point"}  
}  
}  
}'

But it shows the following error.

{"error":"MapperParsingException[Root type mapping not empty after parsing! Remaining fields: [geoip : {properties={location={type=geo\_point}}}]]","status":400}

Kindly help me to solve this issue.

Thanks

Mahesh

---

<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:** [July 6, 2017, 12:07am UTC](https://discuss.elastic.co/t/mapping-error/2577/2 "2017-07-06T00:07:50Z")

</div>


