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

Conversation

Projects
None yet
3 participants
@colings86
Copy link
Member

colings86 commented Aug 6, 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

This comment has been minimized.

Copy link
Member Author

colings86 commented Aug 6, 2014

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

@colings86 colings86 added the review label Aug 6, 2014

@colings86 colings86 self-assigned this Aug 7, 2014

@jpountz

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member Author

colings86 commented Aug 11, 2014

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

@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Aug 11, 2014

LGTM!

@jpountz jpountz removed the review label Aug 11, 2014

Mapping: fixes dynamic mapping of geo_point fields
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 colings86:fix/6939 branch Aug 13, 2014

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.