Open keniobats opened 1 year ago
I think the issue here is that that ubicacion
Geo field is not a native Postgres
field and you need to cast it to a JSON type in order to extract the data.
Implementing out of the box support for Geofields would be a lot of effort and I'm not sure its the right way. I think a cleaner design would be to delegate this to plugins even in the long term. I am thinking of creating a set of builtin plugins to address these use cases.
For now, you can use a plugin similar to this one to extract the fields
In your case, you want to modify the plugin to extract the coordinates
So you can just change that code to
doc['point'] = doc['ubicacion']['coordinates']
where the point field contains your coordinates
Hello! First of all I want to thank you @toluaina for you awesome project! Please keep it that way!!!
PGSync version: 2.3.3
Postgres version: 13-master(postgis)
Elasticsearch version: 8.4
Redis version: 7.0.5
Python version: 3.7.15
Problem Description: I have a field called "ubicacion" with geometry data:
Which, in turn, decodes like this:
Kibana recognizes "ubicacion" field and can be mapped on a map, but it maps it incorrectly because it uses POINT(lon, lat) instead of POINT(lat, lon):
Kibana removes the POINT() if I try inverting lat&lon and, eventually, does not plot the point on a map:
Now, trying to define my schema.json and testing combinations of transforms(all of them, some of them, etc) like this:
I got errors like this:
What I need is to create a field with the lat and lon values to let kibana handle maps markers automatically. Any help will be appreciated!