mapping error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mapping error

Mahesh1992
Hi all, 

This is my mapping. 

curl 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' -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 

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/60da781d-e8b2-4c22-ab00-c865c0807e8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: mapping error

Mahesh1992
Hi all,

I solved this by changing location field type into geo_point.

Thanks

Mahesh

--
Please update your bookmarks! We have moved to https://discuss.elastic.co/
---
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/33824b78-79a9-4981-9e63-6332d03bcab0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.