# Copying fields to a geopoint type?

**URL:** <https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777>\
**Category:** Elasticsearch\
**Created:** [April 2, 2014, 10:21pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777 "2014-04-02T22:21:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pvincent](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pvincent](https://discuss.elastic.co/u/pvincent)\
**Post date:** [April 2, 2014, 10:21pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/1 "2014-04-02T22:21:02Z")

</div>

Hi,

I'm new to elasticsearch. My usecase is to load a csv file containing some  
agencies with geo location, each lines are like :

id;label;address;zipcode;city;region;_latitude_;_longitude_;(and some  
others fields)+

I'm using the csv river plugin to index the file.

My mapping is :

{  
"office": {  
"properties": {

```
*(first fields omitted...)*

  "*latitude*": {
    "type": "double",
  },
  "*longitude*": {
    "type": "double",
  },
  "*location*": {
    "type": "geo_point",
    "lat_lon": "true"
  }
}  

```

}

I'd like to index the location .lon and .lat value from the latitude and  
longitude fields. I tried the copy\_to function with no success :  
"latitude": {  
"type": "double",  
"copy\_to": "location.lat"  
},  
"longitude": {  
"type": "double",  
"copy\_to": "location.lon"  
},

Is there any way to feed the "location" property from latitude and  
longitude fields at indexation ?

My point is that I don't want to modify the input csv file to adapt it to  
the GeoJSON format (i.e concat lat and lon in one field in the csv file).

Thank you for any hints.

Pascal.

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 7, 2014, 7:38am UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/2 "2014-04-07T07:38:07Z")

</div>

Hey,

I dont know about your stack, but maybe logstash would be a good idea to  
add it in there. It is more flexible than the csv river and features a CSV  
input as well. You can easily change the structure of the data you want to  
index. This is how the logstash config would look like

if [latitude] and [longitude] {  
mutate {  
rename =\> ["latitude", "[location][lat]", "longitude",  
"[location][lon]" ]  
}  
}

I am currently working on a blog post how to utilize elasticsearch,  
logstash and kibana on CSV based data and hope to release it soonish on the  
.org blog - which covers exactly this. Stay tuned! 🙂

--Alex

On Thu, Apr 3, 2014 at 12:21 AM, Pascal VINCENT [pasvincent@gmail.com](mailto:pasvincent@gmail.com)wrote:

> Hi,
> 
> I'm new to elasticsearch. My usecase is to load a csv file containing some  
> agencies with geo location, each lines are like :
> 
> id;label;address;zipcode;city;region;_latitude_;_longitude_;(and some  
> others fields)+
> 
> I'm using the csv river plugin to index the file.
> 
> My mapping is :
> 
> {  
> "office": {  
> "properties": {
> 
> ```
> *(first fields omitted...)*
> 
> "*latitude*": {
> "type": "double",
> },
> "*longitude*": {
> "type": "double",
> },
> "*location*": {
> "type": "geo_point",
> "lat_lon": "true"
> }
> }
> 
> ```
> 
> }
> 
> I'd like to index the location .lon and .lat value from the latitude and  
> longitude fields. I tried the copy\_to function with no success :  
> "latitude": {  
> "type": "double",  
> "copy\_to": "location.lat"  
> },  
> "longitude": {  
> "type": "double",  
> "copy\_to": "location.lon"  
> },
> 
> Is there any way to feed the "location" property from latitude and  
> longitude fields at indexation ?
> 
> My point is that I don't want to modify the input csv file to adapt it to  
> the GeoJSON format (i.e concat lat and lon in one field in the csv file).
> 
> Thank you for any hints.
> 
> Pascal.
> 
> --  
> 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pvincent](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pvincent](https://discuss.elastic.co/u/pvincent)\
**Post date:** [April 9, 2014, 9:12pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/3 "2014-04-09T21:12:22Z")

</div>

Hi,

I have included logstash in my stack and started to play with it. I'm sure  
it can do the trick I was looking for, and much more.  
Thank you ...

[waiting for your blog post :)]

Pascal.

On Mon, Apr 7, 2014 at 9:38 AM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:

> Hey,
> 
> I dont know about your stack, but maybe logstash would be a good idea to  
> add it in there. It is more flexible than the csv river and features a CSV  
> input as well. You can easily change the structure of the data you want to  
> index. This is how the logstash config would look like
> 
> if [latitude] and [longitude] {  
> mutate {  
> rename =\> ["latitude", "[location][lat]", "longitude", "[location][lon]" ]  
> }  
> }
> 
> I am currently working on a blog post how to utilize elasticsearch,  
> logstash and kibana on CSV based data and hope to release it soonish on the  
> .org blog - which covers exactly this. Stay tuned! 🙂
> 
> --Alex
> 
> On Thu, Apr 3, 2014 at 12:21 AM, Pascal VINCENT [pasvincent@gmail.com](mailto:pasvincent@gmail.com)wrote:
> 
> > Hi,
> > 
> > I'm new to elasticsearch. My usecase is to load a csv file containing  
> > some agencies with geo location, each lines are like :
> > 
> > id;label;address;zipcode;city;region;_latitude_;_longitude_;(and some  
> > others fields)+
> > 
> > I'm using the csv river plugin to index the file.
> > 
> > My mapping is :
> > 
> > {  
> > "office": {  
> > "properties": {
> > 
> > ```
> > *(first fields omitted...)*
> > 
> > "*latitude*": {
> > "type": "double",
> > },
> > "*longitude*": {
> > "type": "double",
> > },
> > "*location*": {
> > "type": "geo_point",
> > "lat_lon": "true"
> > }
> > }
> > 
> > ```
> > 
> > }
> > 
> > I'd like to index the location .lon and .lat value from the latitude and  
> > longitude fields. I tried the copy\_to function with no success :  
> > "latitude": {  
> > "type": "double",  
> > "copy\_to": "location.lat"  
> > },  
> > "longitude": {  
> > "type": "double",  
> > "copy\_to": "location.lon"  
> > },
> > 
> > Is there any way to feed the "location" property from latitude and  
> > longitude fields at indexation ?
> > 
> > My point is that I don't want to modify the input csv file to adapt it to  
> > the GeoJSON format (i.e concat lat and lon in one field in the csv file).
> > 
> > Thank you for any hints.
> > 
> > Pascal.
> > 
> > --  
> > 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe](https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com)[https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAHN8fD5eQXCPMZD9Y99de%2BqOAFGoQAByb15VOaBUT4maaEOEEQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHN8fD5eQXCPMZD9Y99de%2BqOAFGoQAByb15VOaBUT4maaEOEEQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Kushal\_Zamkade](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@Kushal\_Zamkade](https://discuss.elastic.co/u/Kushal_Zamkade)\
**Post date:** [September 11, 2014, 9:14am UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/4 "2014-09-11T09:14:28Z")

</div>

Hello,

I have created a location filed by using below code

if [latitude] and [longitude] {

```
mutate {
  rename => ["latitude", "[location][lat]", "longitude", "[location][lon]" ]

}

```

}

But when i check location field type then it is not created as geo\_point.

when i am trying to search a geo\_point then i am getting below error.  
QueryParsingException[[logstash-2014.09.11] failed to find geo\_point field [location1]];

can you help me to resolve this

On Thursday, April 10, 2014 2:42:22 AM UTC+5:30, Pascal VINCENT wrote:

> Hi,
> 
> I have included logstash in my stack and started to play with it. I'm sure  
> it can do the trick I was looking for, and much more.  
> Thank you ...
> 
> [waiting for your blog post :)]
> 
> Pascal.
> 
> On Mon, Apr 7, 2014 at 9:38 AM, Alexander Reelsen \<[a...@spinscale.de](mailto:a...@spinscale.de)  
> \<javascript:\>\> wrote:
> 
> > Hey,
> > 
> > I dont know about your stack, but maybe logstash would be a good idea to  
> > add it in there. It is more flexible than the csv river and features a CSV  
> > input as well. You can easily change the structure of the data you want to  
> > index. This is how the logstash config would look like
> > 
> > if [latitude] and [longitude] {
> > 
> > ```
> > mutate {
> > rename => ["latitude", "[location][lat]", "longitude", "[location][lon]" ]
> > 
> > }
> > 
> > ```
> > 
> > }
> > 
> > I am currently working on a blog post how to utilize elasticsearch,  
> > logstash and kibana on CSV based data and hope to release it soonish on the  
> > .org blog - which covers exactly this. Stay tuned! 🙂
> > 
> > --Alex
> > 
> > On Thu, Apr 3, 2014 at 12:21 AM, Pascal VINCENT \<[pasvi...@gmail.com](mailto:pasvi...@gmail.com)  
> > \<javascript:\>\> wrote:
> > 
> > > Hi,
> > > 
> > > I'm new to elasticsearch. My usecase is to load a csv file containing  
> > > some agencies with geo location, each lines are like :
> > > 
> > > id;label;address;zipcode;city;region;_latitude_;_longitude_;(and some  
> > > others fields)+
> > > 
> > > I'm using the csv river plugin to index the file.
> > > 
> > > My mapping is :
> > > 
> > > {  
> > > "office": {  
> > > "properties": {
> > > 
> > > ```
> > > *(first fields omitted...)*
> > > 
> > > "*latitude*": {
> > > "type": "double",
> > > },
> > > "*longitude*": {
> > > "type": "double",
> > > },
> > > "*location*": {
> > > "type": "geo_point",
> > > "lat_lon": "true"
> > > }
> > > }  
> > > 
> > > ```
> > > 
> > > }
> > > 
> > > I'd like to index the location .lon and .lat value from the latitude and  
> > > longitude fields. I tried the copy\_to function with no success :  
> > > "latitude": {  
> > > "type": "double",  
> > > "copy\_to": "location.lat"  
> > > },  
> > > "longitude": {  
> > > "type": "double",  
> > > "copy\_to": "location.lon"  
> > > },
> > > 
> > > Is there any way to feed the "location" property from latitude and  
> > > longitude fields at indexation ?
> > > 
> > > My point is that I don't want to modify the input csv file to adapt it  
> > > to the GeoJSON format (i.e concat lat and lon in one field in the csv file).
> > > 
> > > Thank you for any hints.
> > > 
> > > Pascal.
> > > 
> > > --  
> > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.
> > > 
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe](https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d31447ff-ec4b-4273-a35c-fc5134aaedf0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d31447ff-ec4b-4273-a35c-fc5134aaedf0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AlexBV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexbv/32/44813_2.png) [@AlexBV](https://discuss.elastic.co/u/AlexBV)\
**Post date:** [April 1, 2015, 4:21pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/5 "2015-04-01T16:21:23Z")

</div>

Were you ever able to figure out a solution to this? I'm in a similar boat.

On Thursday, September 11, 2014 at 2:14:29 AM UTC-7, Kushal Zamkade wrote:

> Hello,
> 
> I have created a location filed by using below code
> 
> if [latitude] and [longitude] {
> 
> ```
> mutate {
> rename => ["latitude", "[location][lat]", "longitude", "[location][lon]" ]
> 
> }
> 
> ```
> 
> }
> 
> But when i check location field type then it is not created as geo\_point.
> 
> when i am trying to search a geo\_point then i am getting below error.  
> QueryParsingException[[logstash-2014.09.11] failed to find geo\_point field [location1]];
> 
> can you help me to resolve this
> 
> On Thursday, April 10, 2014 2:42:22 AM UTC+5:30, Pascal VINCENT wrote:
> 
> > Hi,
> > 
> > I have included logstash in my stack and started to play with it. I'm  
> > sure it can do the trick I was looking for, and much more.  
> > Thank you ...
> > 
> > [waiting for your blog post :)]
> > 
> > Pascal.
> > 
> > On Mon, Apr 7, 2014 at 9:38 AM, Alexander Reelsen [a...@spinscale.de](mailto:a...@spinscale.de)  
> > wrote:
> > 
> > > Hey,
> > > 
> > > I dont know about your stack, but maybe logstash would be a good idea to  
> > > add it in there. It is more flexible than the csv river and features a CSV  
> > > input as well. You can easily change the structure of the data you want to  
> > > index. This is how the logstash config would look like
> > > 
> > > if [latitude] and [longitude] {
> > > 
> > > ```
> > > mutate {
> > > rename => ["latitude", "[location][lat]", "longitude", "[location][lon]" ]
> > > 
> > > }
> > > 
> > > ```
> > > 
> > > }
> > > 
> > > I am currently working on a blog post how to utilize elasticsearch,  
> > > logstash and kibana on CSV based data and hope to release it soonish on the  
> > > .org blog - which covers exactly this. Stay tuned! 🙂
> > > 
> > > --Alex
> > > 
> > > On Thu, Apr 3, 2014 at 12:21 AM, Pascal VINCENT [pasvi...@gmail.com](mailto:pasvi...@gmail.com)  
> > > wrote:
> > > 
> > > > Hi,
> > > > 
> > > > I'm new to elasticsearch. My usecase is to load a csv file containing  
> > > > some agencies with geo location, each lines are like :
> > > > 
> > > > id;label;address;zipcode;city;region;_latitude_;_longitude_;(and some  
> > > > others fields)+
> > > > 
> > > > I'm using the csv river plugin to index the file.
> > > > 
> > > > My mapping is :
> > > > 
> > > > {  
> > > > "office": {  
> > > > "properties": {
> > > > 
> > > > ```
> > > > *(first fields omitted...)*
> > > > 
> > > > "*latitude*": {
> > > > "type": "double",
> > > > },
> > > > "*longitude*": {
> > > > "type": "double",
> > > > },
> > > > "*location*": {
> > > > "type": "geo_point",
> > > > "lat_lon": "true"
> > > > }
> > > > }  
> > > > 
> > > > ```
> > > > 
> > > > }
> > > > 
> > > > I'd like to index the location .lon and .lat value from the latitude  
> > > > and longitude fields. I tried the copy\_to function with no success :  
> > > > "latitude": {  
> > > > "type": "double",  
> > > > "copy\_to": "location.lat"  
> > > > },  
> > > > "longitude": {  
> > > > "type": "double",  
> > > > "copy\_to": "location.lon"  
> > > > },
> > > > 
> > > > Is there any way to feed the "location" property from latitude and  
> > > > longitude fields at indexation ?
> > > > 
> > > > My point is that I don't want to modify the input csv file to adapt it  
> > > > to the GeoJSON format (i.e concat lat and lon in one field in the csv file).
> > > > 
> > > > Thank you for any hints.
> > > > 
> > > > Pascal.
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > > 
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6e12ced7-5b1a-4142-93d1-a3d22d7138a2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe](https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq\_sY3sJ8g%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM-uHKT74qVbDT%3D8qg5Cv4vH0y%3DOzC8hGyO2uq_sY3sJ8g%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4102f8c3-bdb5-457c-8adb-6c19cb2627c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4102f8c3-bdb5-457c-8adb-6c19cb2627c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![pvincent](https://avatars.discourse-cdn.com/v4/letter/p/f9ae1b/32.png) [@pvincent](https://discuss.elastic.co/u/pvincent)\
**Post date:** [April 1, 2015, 7:31pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/6 "2015-04-01T19:31:05Z")

</div>

I finally come up with :

if [latitude] and [longitude] {  
mutate {  
add\_field =\> ["[location]", "%{longitude}" ]  
add\_field =\> ["[location]", "%{latitude}" ]  
}  
mutate {  
convert =\> ["[location]", "float" ]  
}  
}

> > >

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/47c8334d-109e-4052-9973-afa69dd49709%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/47c8334d-109e-4052-9973-afa69dd49709%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![AlexBV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexbv/32/44813_2.png) [@AlexBV](https://discuss.elastic.co/u/AlexBV)\
**Post date:** [April 1, 2015, 8:21pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/7 "2015-04-01T20:21:31Z")

</div>

Woah crazy, never would've thought of that, thanks a lot for following up!

On Wed, Apr 1, 2015 at 12:31 PM, Pascal VINCENT [pasvincent@gmail.com](mailto:pasvincent@gmail.com)  
wrote:

> I finally come up with :
> 
> if [latitude] and [longitude] {  
> mutate {  
> add\_field =\> ["[location]", "%{longitude}" ]  
> add\_field =\> ["[location]", "%{latitude}" ]  
> }  
> mutate {  
> convert =\> ["[location]", "float" ]  
> }  
> }
> 
> > > > --  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups "elasticsearch" group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe](https://groups.google.com/d/topic/elasticsearch/QaI1fj74RlM/unsubscribe).  
> > > > To unsubscribe from this group and all its topics, send an email to  
> > > > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/47c8334d-109e-4052-9973-afa69dd49709%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/47c8334d-109e-4052-9973-afa69dd49709%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/47c8334d-109e-4052-9973-afa69dd49709%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/47c8334d-109e-4052-9973-afa69dd49709%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
-- Alex

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CACXbQESyNcYr9g1u2dEFRovHE-NtB\_JwugNn76G7\_36Tm0Mteg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACXbQESyNcYr9g1u2dEFRovHE-NtB_JwugNn76G7_36Tm0Mteg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Dimitris\_Ganosis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimitris_ganosis/32/731_2.png) [@Dimitris\_Ganosis](https://discuss.elastic.co/u/Dimitris_Ganosis)\
**Post date:** [April 28, 2015, 2:01pm UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/8 "2015-04-28T14:01:46Z")

</div>

I can use it in Kibana 3 but not in Kibana 4. Any idea why?

On Wednesday, 1 April 2015 20:31:05 UTC+1, Pascal VINCENT wrote:

> I finally come up with :
> 
> if [latitude] and [longitude] {  
> mutate {  
> add\_field =\> ["[location]", "%{longitude}" ]  
> add\_field =\> ["[location]", "%{latitude}" ]  
> }  
> mutate {  
> convert =\> ["[location]", "float" ]  
> }  
> }
> 
> > > >

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/83648add-5ea4-4a68-826a-58e7141dea12%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83648add-5ea4-4a68-826a-58e7141dea12%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:17am UTC](https://discuss.elastic.co/t/copying-fields-to-a-geopoint-type/16777/9 "2017-07-06T00:17:24Z")

</div>


