-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Mapping: Geopoint with array broken (dynamic mapping): geo_point expected #6939
Comments
This also appears to be happening on the master branch. |
Seems like it's blowing up since the geo_point is only parsing the first value instead of the 2 item array as a whole. It works the second time through because the mapper object within org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray caches location_array as a geo_point so the array logic properly pulls the mapper. The first time through that entry is not there so the mapper comes up null and it tries to parse the array values individually. May I suggest adding some logic to the org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray method to run the template builder logic to find the GeoMapper
|
If a dynamic mapping for a geo_point field is defined and the first document specifies the value of the field as a geo_point array, the dynamic mapping throws an error as the array is broken into individual number before consulting the dynamic mapping configuration. This change adds a check of the dynamic mapping before the array is split into individual numbers. Closes #6939
If a dynamic mapping for a geo_point field is defined and the first document specifies the value of the field as a geo_point array, the dynamic mapping throws an error as the array is broken into individual number before consulting the dynamic mapping configuration. This change adds a check of the dynamic mapping before the array is split into individual numbers. Closes #6939
I use Elasticsearch with Logstash and dynamic mapping.
I my logs, I have geopoints with the array syntax.
It was OK with ES 1.0.X, but it's broken with ES 1.2.2.
Template:
Delete index:
Try to add a doc/log:
It fails with this message:
If I insert a doc with a geopoint as an object, it works, and the mapping is created dynamically.
After that, I can insert a doc with a geopoint as an array without error.
The text was updated successfully, but these errors were encountered: