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 <[email protected]>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 [email protected].
> 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?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 [email protected].
To view this discussion on the web visit
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.