Latitude -> Lat, Longitude -> lon

Hi there,

I understand a geo-point can be mapped based on two fields : "lat", "long".
However my fields are name "longitude" and "latitude".
I'm using the river plugin for couchdb and I cannot really rename those
fields before indexing. And those fields are part of an item in an array:

"items": [
{
"item_id" : "abcd",
"location":
{
"longitude": 145.7711,
"latitude": -16.92359
}
},
{
"item_id" : "efgh",
"location":
{
"longitude": 149.6611,
"latitude": -19.94098
}
}
]

So, any idea how I can rename those fields? And eventually map it to a geo
point
(http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-point-type.html)?

Cheers

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/96700d4a-c3f5-441a-a53f-dfee9e934364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You could may be try to use script filters and add on the fly lat and lon fields or a String representing your point.

See doc: https://github.com/elasticsearch/elasticsearch-river-couchdb

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 7 juil. 2014 à 02:23, Olivier B obierlai@gmail.com a écrit :

Hi there,

I understand a geo-point can be mapped based on two fields : "lat", "long".
However my fields are name "longitude" and "latitude".
I'm using the river plugin for couchdb and I cannot really rename those fields before indexing. And those fields are part of an item in an array:

"items": [
{
"item_id" : "abcd",
"location":
{
"longitude": 145.7711,
"latitude": -16.92359
}
},
{
"item_id" : "efgh",
"location":
{
"longitude": 149.6611,
"latitude": -19.94098
}
}
]

So, any idea how I can rename those fields? And eventually map it to a geo point (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-point-type.html)?

Cheers

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/96700d4a-c3f5-441a-a53f-dfee9e934364%40googlegroups.com.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6C446501-E0D4-4888-B737-CFE457DE5320%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Thanks for your reply.
I know I tried that, but it's in an array, so Iw ould need to iterate or
something, because trying to map the path leads to an error if there is an
array:
Here, items is an array: ctx.doc.items.location.longitude

That's why i'm looking for an alternative solution.

On Monday, July 7, 2014 4:16:48 PM UTC+10, David Pilato wrote:

You could may be try to use script filters and add on the fly lat and lon
fields or a String representing your point.

See doc: GitHub - elastic/elasticsearch-river-couchdb: CouchDB River Plugin for elasticsearch (STOPPED)

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 7 juil. 2014 à 02:23, Olivier B <obie...@gmail.com <javascript:>> a
écrit :

Hi there,

I understand a geo-point can be mapped based on two fields : "lat", "long".
However my fields are name "longitude" and "latitude".
I'm using the river plugin for couchdb and I cannot really rename those
fields before indexing. And those fields are part of an item in an array:

"items": [
{
"item_id" : "abcd",
"location":
{
"longitude": 145.7711,
"latitude": -16.92359
}
},
{
"item_id" : "efgh",
"location":
{
"longitude": 149.6611,
"latitude": -19.94098
}
}
]

So, any idea how I can rename those fields? And eventually map it to a geo
point (
Elasticsearch Platform — Find real-time answers at scale | Elastic
)?

Cheers

--
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 <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/96700d4a-c3f5-441a-a53f-dfee9e934364%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/96700d4a-c3f5-441a-a53f-dfee9e934364%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e2c23a9d-d901-49d6-8dfb-d8f9d501c766%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.