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 field mappers to always pass through index settings #9780

Merged
merged 1 commit into from Feb 23, 2015

Conversation

@rjernst
Copy link
Member

commented Feb 20, 2015

Currently many meta field mappers do not take index settings in their
simple constructor that DocumentMapper uses, and instead pass null or
empty settings to the parent abstract mapper. This change fixes them to
pass through index settings, and adds an assertion in AbstractFieldMapper
that settings are not null.

@kimchy

This comment has been minimized.

Copy link
Member

commented Feb 20, 2015

LGTM

@drewr drewr force-pushed the elastic:master branch to 7c20a8a Feb 20, 2015
@rjernst rjernst force-pushed the rjernst:fix/mapper-index-settings branch Feb 23, 2015
Currently many meta field mappers do not take index settings in their
simple constructor that DocumentMapper uses, and instead pass null or
empty settings to the parent abstract mapper.  This change fixes them to
pass through index settings, and adds an assertion in AbstractFieldMapper
that settings are not null.

closes #9780
@rjernst rjernst force-pushed the rjernst:fix/mapper-index-settings branch to f3d5d48 Feb 23, 2015
@rjernst rjernst merged commit f3d5d48 into elastic:master Feb 23, 2015
1 check passed
1 check passed
CLA Commit author is a member of Elasticsearch
Details
@rjernst rjernst deleted the rjernst:fix/mapper-index-settings branch Feb 23, 2015
@dadoonet

This comment has been minimized.

Copy link
Member

commented Feb 23, 2015

Note: this commit is my primary suspect for failures in mapper attachment plugin.
Going to fix that.

org.elasticsearch.ElasticsearchIllegalStateException: [index.version.created] is not present in the index settings for index with uuid: [null]
    at __randomizedtesting.SeedInfo.seed([8214BC00B3DEEBCA:9B8FF2F963DAB833]:0)
    at org.elasticsearch.Version.indexCreated(Version.java:446)
    at org.elasticsearch.index.mapper.core.AbstractFieldMapper.<init>(AbstractFieldMapper.java:351)
    at org.elasticsearch.index.mapper.attachment.AttachmentMapper.<init>(AttachmentMapper.java:358)
    at org.elasticsearch.index.mapper.attachment.AttachmentMapper$Builder.build(AttachmentMapper.java:213)
    at org.elasticsearch.index.mapper.attachment.AttachmentMapper$Builder.build(AttachmentMapper.java:86)
    at org.elasticsearch.index.mapper.object.ObjectMapper$Builder.build(ObjectMapper.java:195)
    at org.elasticsearch.index.mapper.DocumentMapper$Builder.<init>(DocumentMapper.java:185)
    at org.elasticsearch.index.mapper.MapperBuilders.doc(MapperBuilders.java:41)
    at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:232)
    at org.elasticsearch.index.mapper.DocumentMapperParser.parseCompressed(DocumentMapperParser.java:213)
    at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:441)
dadoonet added a commit to elastic/elasticsearch-mapper-attachments that referenced this pull request Feb 23, 2015
Caused by elastic/elasticsearch#9780 we now need to pass index settings instead of empty settings.

Closes #109.
@clintongormley clintongormley changed the title Internal: Fix field mappers to always pass through index settings Fix field mappers to always pass through index settings Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.