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

MetaDataMappingService should call MapperService.merge with the original mapping update. #15508

Merged
merged 1 commit into from Dec 17, 2015

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Dec 17, 2015

Currently MetaDataMappingService parses the mapping updates, reserializes it and
finally calls MapperService.merge with the serialized mapping. Given that mapping
serialization only writes differences from the default, this is a bit unfair to
parsers since they can't know whether some option has been explicitly set or not.

Furthermore this can cause bugs with metadata fields given that these fields use
existing field types as defaults.

This commit changes MetaDataMappingService to call MapperService.merge with the
original mapping update.

…nal mapping update.

Currently MetaDataMappingService parses the mapping updates, reserializes it and
finally calls MapperService.merge with the serialized mapping. Given that mapping
serialization only writes differences from the default, this is a bit unfair to
parsers since they can't know whether some option has been explicitly set or not.

Furthermore this can cause bugs with metadata fields given that these fields use
existing field types as defaults.

This commit changes MetaDataMappingService to call MapperService.merge with the
original mapping update.
@jpountz jpountz added review :Search/Mapping Index mappings, including merging and defining field types v5.0.0-alpha1 v2.2.0 >bug labels Dec 17, 2015
@rjernst
Copy link
Member

rjernst commented Dec 17, 2015

Lgtm

jpountz added a commit that referenced this pull request Dec 17, 2015
MetaDataMappingService should call MapperService.merge with the original mapping update.
@jpountz jpountz merged commit 76abf43 into elastic:master Dec 17, 2015
@jpountz jpountz deleted the fix/MetaDataMappingService branch December 17, 2015 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Mapping Index mappings, including merging and defining field types v2.2.0 v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants