-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geo_point value parsing seems inconsistent and documentation could be improved #24944
Comments
So, this is a tricky one. The problem here is that expression likes |
@imotov Your proposal for a better error message would help a lot to pinpoint the problem. It has been a while, but as far as I remember when you set "ignore_malformed" on the type mapping, my expected behavior would be that malformed value should be ignored, and not saved in the document. |
That is the behaviour. As I tried to explain above I cannot think of any additional work that can be done in order to improve the situation here. So, if there are no other suggestions, I am going to close this issue for now. |
Elasticsearch version:
5.4
Plugins installed: []
None
JVM version (
java -version
):1.8.0_131
OS version (
uname -a
if on a Unix-like system):Linux 13f1d2351e28 4.4.0-78-generic #99-Ubuntu SMP Thu Apr 27 15:29:09 UTC 2017 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
Confusing error messages are returned during indexing of geo_points, and even worse, in the case of using "ignore_malformed" in the type mapping, the geo_point field will have a wrong value which will be used in e.g. aggregations.
The core of the problem seems to be that using the object format for the geo_point, string values for lat/lon are as expected parsed and interpreted as floats. Where as in the geo_point array format a string will be interpreted as a geohash value. The error message returned when parsing a float as a geohash value is confusing (also considering that the decimal point is not a valid character in the geohash encoding). Could this somehow be improved to make this easier to catch and understand?
In the case where when specifying "ignore_malformed" in the type mapping, I would have expected that the field would be ignored in the document, and not that it is set to the best guess. Or did I misread the documentation?
Steps to reproduce:
The problem can be recreated by issuing the following commands:
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: