Distopic
Distopic

Reputation: 737

Passing geo variables with scala to kibana

i am trying to pass geo coordenates to my index in kibana using scala. I dont have problem for date, numbers. string... but when i try:

Map("month" -> "11",
    "year" -> "2015-13-01",
    "total2" ->   y,
    "formalizada2"->14,
    "days"->33,
    "porcentaje"->0.045,
    "location"-> Map("lat" -> 23.0, "lon" -> -23.02)
),

My kibana have problems to detect the lat and the lon to do something with the map. Somebody Knows how i can pass coordenates to my kibana index using Scala?

Thanks for all.

Upvotes: 2

Views: 139

Answers (1)

Evaldas Buinauskas
Evaldas Buinauskas

Reputation: 14097

I'm not familiar with Scala, but Elasticsearch supports multiple geo_point formats.

One of them is passing lat/lon as array of two elements, which means you could pass your "location" like this [-23.02, 23.0], where first element is lon and second one is lat.

Perhaps that will solve your issue.

Upvotes: 1

Related Questions