# Exactly how to map geoip.location to geo\_point

**URL:** <https://discuss.elastic.co/t/exactly-how-to-map-geoip-location-to-geo-point/92917>\
**Category:** Elasticsearch\
**Created:** [July 13, 2017, 4:10am UTC](https://discuss.elastic.co/t/exactly-how-to-map-geoip-location-to-geo-point/92917 "2017-07-13T04:10:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon1](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@Leon1](https://discuss.elastic.co/u/Leon1)\
**Post date:** [July 13, 2017, 4:10am UTC](https://discuss.elastic.co/t/exactly-how-to-map-geoip-location-to-geo-point/92917/1 "2017-07-13T04:10:10Z")

</div>

Here is my template

{  
"template" : "cisco-asa\*",  
"settings" : {  
"index.refresh\_interval" : "5s"  
},  
"mappings" : {  
"_default_" : {  
"\_all" : {"enabled" : true},  
"dynamic\_templates" : [ {  
"ip\_fields": {  
"match": "_\_ip",  
"mapping": {  
"type": "ip",  
"index": "analyzed",  
"fields": {  
"raw": { "type": "string", "index": "not\_analyzed" }  
}  
}  
}  
}, {  
"string\_fields" : {  
"match" : "_",  
"match\_mapping\_type" : "string",  
"mapping" : {  
"type" : "string", "index" : "analyzed", "omit\_norms" : true,  
"fields" : {  
"raw" : {"type": "string", "index" : "not\_analyzed", "ignore\_above" : 256}  
}  
}  
}  
} ],  
"properties" : {  
"@version": { "type": "string", "index": "not\_analyzed" },  
"geoip" : {  
"type" : "object",  
"dynamic": true,  
"path": "full",  
"properties" : {  
"latitude" : { "type" : "float" },  
"location" : { "type" : "geo\_point" },  
"longitude" : { "type" : "float"},  
}  
}  
}  
}  
}  
}

Here is the geoip mapping, which is obviously incorrect for the location. The interesting thing is that everything else maps correctly, but the geo\_point... any ideas ? I've been doing extensive research on this for the past 4 hours but found no solution to this problem....

```
				"geoip" : {
					"properties" : {
						"city_name" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"continent_code" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"country_code2" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"country_code3" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"country_name" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"ip" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"latitude" : {
							"type" : "float"
						},
						"location" : {
							"type" : "float"
						},
						"longitude" : {
							"type" : "float"
						},
						"postal_code" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"real_region_name" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"region_name" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						},
						"timezone" : {
							"type" : "text",
							"fields" : {
								"keyword" : {
									"type" : "keyword",
									"ignore_above" : 256
								}
							}
						}
					}
				},
```

---

<div class="post-metadata">

**Author:** ![Leon1](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@Leon1](https://discuss.elastic.co/u/Leon1)\
**Post date:** [July 13, 2017, 6:55pm UTC](https://discuss.elastic.co/t/exactly-how-to-map-geoip-location-to-geo-point/92917/2 "2017-07-13T18:55:01Z")

</div>

I ended up having to delete all mappings , templates, and indices, apply a brand new template via curl or kibana built in console (5.x) to make this work.

---

<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:** [August 10, 2017, 6:55pm UTC](https://discuss.elastic.co/t/exactly-how-to-map-geoip-location-to-geo-point/92917/3 "2017-08-10T18:55:08Z")

</div>

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