I'm trying to index some twitter data without success because of the coordinates field that I want to use as geo_point.
Here is my template:
Here is a document:
When I run steps to delete index, replace template and insert my document I'm getting an error:
{"error":{"root_cause":[{"type":"parse_exception","reason":"geo_point expected"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"parse_exception","reason":"geo_point expected"}},"status":400}
you are actually not indexing a geo_point (that consists only of a lon and lat pair), but a geo_shape, which in your example incidentally turns out to be a point, but could also be a line or a polygon.
In order to fix this, you could just use this in your tweet
nothing. Just because it works, does not mean it is intuitive to me
The person coming after you has to know which is the latitude and the longitude. And this person also needs to know, if you write a geo point as a string like41.12, -71.34, you need to reverse it to make it work. Because of that I am just always preferring to mark, which field represents what by naming it appropriately. Internally everyone of those three representations gets stored the same for, so it does not make a difference when searching.
and my mapping template for coordinates.coordinates type is geo_point and it doesn't work... as this representation is normally correctly handled by elasticsearch (as per doc).
The field coordinates.coordinates is an array, and by the template this field is defined to be a geo_point, and per doc an array is a valid representation of geo_point...
is it because it must not be in an object? on the root?
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.