Is there anyway I could have elasticsearch reorder this array or convert
this field to a string without having to modify the source document prior
to indexing? Could this be done using a field mapping or script in
elasticsearch?
you could index this as a geo shape (as this is valid GeoJSON). If you
really need the functionality for a geo_point, you need to change the
structure of the data.
Is there anyway I could have elasticsearch reorder this array or convert
this field to a string without having to modify the source document prior
to indexing? Could this be done using a field mapping or script in
elasticsearch?
I looked at the documenation for elasticsearch's geo_shape and it looks
like that use [longitude, latitude]
Found this node on the geo_shape documentation page
Note: In GeoJSON, and therefore Elasticsearch, the correctcoordinate order
is longitude, latitude (X, Y) within coordinate arrays. This differs from
many Geospatial APIs (e.g., Google Maps) that generally use the colloquial
latitude, longitude (Y, X).
An alternative I found was to use the computed fields plugin
This seems to create the string in the correct format for the geo point.
The issue I am having with this method right now is that Elasticsearch
will return an error if the source document does not have the
geo.coordinates field.
On Sunday, June 1, 2014 4:28:24 PM UTC-4, Alexander Reelsen wrote:
Hey,
you could index this as a geo shape (as this is valid GeoJSON). If you
really need the functionality for a geo_point, you need to change the
structure of the data.
--Alex
On Sat, May 31, 2014 at 3:36 PM, Brian Thomas <mynam...@gmail.com
<javascript:>> wrote:
I am new to Elasticsearch and I am trying to index a json document with a
nonstandard lat/long format.
I know the standard format for a geo_point array is [lon, lat], but the
documents I am indexing has format [lat, lon].
Is there anyway I could have elasticsearch reorder this array or convert
this field to a string without having to modify the source document prior
to indexing? Could this be done using a field mapping or script in
elasticsearch?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.