# Can I use geo\_point and index\_name (to rename to the lat and lon fieldnames) together?

**URL:** <https://discuss.elastic.co/t/can-i-use-geo-point-and-index-name-to-rename-to-the-lat-and-lon-fieldnames-together/9836>\
**Category:** Elasticsearch\
**Created:** [November 27, 2012, 7:38am UTC](https://discuss.elastic.co/t/can-i-use-geo-point-and-index-name-to-rename-to-the-lat-and-lon-fieldnames-together/9836 "2012-11-27T07:38:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jase](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@Jase](https://discuss.elastic.co/u/Jase)\
**Post date:** [November 27, 2012, 7:38am UTC](https://discuss.elastic.co/t/can-i-use-geo-point-and-index-name-to-rename-to-the-lat-and-lon-fieldnames-together/9836/1 "2012-11-27T07:38:04Z")

</div>

I have data that includes a field that looks like this:

location: {  
degreesLatitude: value  
degreesLongitude: value  
}

and I'd like to map it to a geo\_point type in ES. I've been trying  
something like this but the sub properties never make it into the ES  
mappings.

"location":{  
"type" : "geo\_point",  
"properties" : {  
"degreesLatitude" : {  
"type" : "double" ,  
"index\_name" : "lat"  
},  
"degreesLongitude" : {  
"type" : "double" ,  
"index\_name" : "lon"  
}  
}  
}

can anyone tell me if this should work? or how I can achieve my goal?  
thanks.

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 27, 2012, 1:04pm UTC](https://discuss.elastic.co/t/can-i-use-geo-point-and-index-name-to-rename-to-the-lat-and-lon-fieldnames-together/9836/2 "2012-11-27T13:04:04Z")

</div>

At the moment, the names "lat" and "lon" are hardcoded in the parser that  
parses incoming documents, so you will probably have to change your data.

On Tuesday, November 27, 2012 2:38:05 AM UTC-5, Jase wrote:

> I have data that includes a field that looks like this:
> 
> location: {  
> degreesLatitude: value  
> degreesLongitude: value  
> }
> 
> and I'd like to map it to a geo\_point type in ES. I've been trying  
> something like this but the sub properties never make it into the ES  
> mappings.
> 
> "location":{  
> "type" : "geo\_point",  
> "properties" : {  
> "degreesLatitude" : {  
> "type" : "double" ,  
> "index\_name" : "lat"  
> },  
> "degreesLongitude" : {  
> "type" : "double" ,  
> "index\_name" : "lon"  
> }  
> }  
> }
> 
> can anyone tell me if this should work? or how I can achieve my goal?  
> thanks.

--

---

<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, 3:02am UTC](https://discuss.elastic.co/t/can-i-use-geo-point-and-index-name-to-rename-to-the-lat-and-lon-fieldnames-together/9836/3 "2017-07-06T03:02:45Z")

</div>


