Skip to content
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

Fix dynamic mapping of geo_point fields #7175

Merged
merged 1 commit into from
Aug 11, 2014
Merged

Fix dynamic mapping of geo_point fields #7175

merged 1 commit into from
Aug 11, 2014

Conversation

colings86
Copy link
Contributor

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

@colings86
Copy link
Contributor Author

There is possibly a neater way of doing this so any suggestions on a more efficient/elegant method would be good

@colings86 colings86 self-assigned this Aug 7, 2014
@jpountz
Copy link
Contributor

jpountz commented Aug 11, 2014

This looks correct, but I'm wondering if more withinNewMapper/traverse/etc. logic could be shared with parseDynamicValue?

@jpountz jpountz removed the review label Aug 11, 2014
@colings86
Copy link
Contributor Author

I couldn't see how we could share code with parseDynamicValue but I did share some code with serializeObject

@jpountz
Copy link
Contributor

jpountz commented Aug 11, 2014

LGTM!

@jpountz jpountz removed the review label Aug 11, 2014
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
@colings86 colings86 merged commit 5349ecd into elastic:master Aug 11, 2014
@colings86 colings86 deleted the fix/6939 branch August 13, 2014 08:10
@colings86 colings86 assigned colings86 and unassigned colings86 Aug 21, 2014
@clintongormley clintongormley changed the title Mapping: fixes dynamic mapping of geo_point fields Mapping: Fix dynamic mapping of geo_point fields Sep 11, 2014
@clintongormley clintongormley changed the title Mapping: Fix dynamic mapping of geo_point fields Fix dynamic mapping of geo_point fields Jun 7, 2015
@clintongormley clintongormley added the :Search Foundations/Mapping Index mappings, including merging and defining field types label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Mapping Index mappings, including merging and defining field types v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapping: Geopoint with array broken (dynamic mapping): geo_point expected
3 participants