-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Propagate mapper builder context flags across nested mapper builder context creation #109963
Propagate mapper builder context flags across nested mapper builder context creation #109963
Conversation
Pinging @elastic/es-search (Team:Search) |
Hi @javanna, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a yaml test with a mapping that uses a nested field type, which has a sub field of type date or long with ignore_malformed enabled. Also enable index.mode=logs. Index a document with that structure and with a malformed value. Then assert that the malformed value can be retrieved from _source. I expect this to fail without this fix.
…ontext creation MapperBuilderContext includes information about whether synthetic source is configured, we are in a data streams and there are dimensions. This info is currently not propagated across the constructor of NestedMapperBuilderContext, which means that the builder context for the nested type receives hardcoded (false) info. This commit fixes that.
280c0a6
to
58382df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the integration test that shows how this bug breaks synthetic source.
LGTM2
@elasticmachine run elasticsearch-ci/part-1 |
💔 Backport failed
You can use sqren/backport to manually backport by running |
…ontext creation (elastic#109963) MapperBuilderContext includes information about whether synthetic source is configured, we are in a data streams and there are dimensions. This info is currently not propagated across the constructor of NestedMapperBuilderContext, which means that the builder context for the nested type receives hardcoded (false) info. This commit fixes that. One symptom of this, due to not propagating the info about whether synthetic source is configured, is that numeric fields that have ignore_malformed set to true, mapped under a nested type, will cause shard failures whenever a document with ignored values is retrieved in the fetch phase
MapperBuilderContext includes information about whether synthetic source is configured, we are in a data streams and there are dimensions. This info is currently not propagated across the constructor of NestedMapperBuilderContext, which means that the builder context for the nested type receives hardcoded (false) info. This commit fixes that.
One symptom of this, due to not propagating the info about whether synthetic source is configured, is that numeric fields that have
ignore_malformed
set totrue
, mapped under anested
type, will cause shard failures whenever a document with ignored values is retrieved in the fetch phase: