Dynamic runtime to not dynamically create objects#74234
Merged
javanna merged 2 commits intoelastic:masterfrom Jun 18, 2021
Merged
Dynamic runtime to not dynamically create objects#74234javanna merged 2 commits intoelastic:masterfrom
javanna merged 2 commits intoelastic:masterfrom
Conversation
When we introduced dynamic:runtime (elastic#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts. With this commit we adapt dynamic:runtime to not dynamically create objects.
Collaborator
|
Pinging @elastic/es-search (Team:Search) |
romseygeek
approved these changes
Jun 17, 2021
Contributor
romseygeek
left a comment
There was a problem hiding this comment.
Nice! This makes a whole bunch of stuff much simpler.
jtibshirani
reviewed
Jun 18, 2021
Contributor
jtibshirani
left a comment
There was a problem hiding this comment.
This change makes sense to me, it feels surprising that we would create these new objects under properties because of a dynamic runtime update.
The PR made me notice a couple aspects of dynamic runtime mapping I am confused about, I'll follow up on another channel.
javanna
added a commit
to javanna/elasticsearch
that referenced
this pull request
Jun 18, 2021
When we introduced dynamic:runtime (elastic#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts. With this commit we adapt dynamic:runtime to not dynamically create objects. Closes elastic#70268
javanna
added a commit
to javanna/elasticsearch
that referenced
this pull request
Jun 18, 2021
Two IT tests added as part of elastic#74234 have turned out to be flaky in that they rely on dynamic mappings updated to be available after indexing documents. This commit reworks them to instead use search and check what gets returned instead of checking what get mappings returns and doing a string comparison.
javanna
added a commit
that referenced
this pull request
Jun 18, 2021
When we introduced dynamic:runtime (#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts. With this commit we adapt dynamic:runtime to not dynamically create objects. Closes #70268
javanna
added a commit
that referenced
this pull request
Jun 18, 2021
Two IT tests added as part of #74234 have turned out to be flaky in that they rely on dynamic mappings updated to be available after indexing documents. This commit reworks them to instead use search and check what gets returned instead of checking what get mappings returns and doing a string comparison.
javanna
added a commit
that referenced
this pull request
Jun 18, 2021
Two IT tests added as part of #74234 have turned out to be flaky in that they rely on dynamic mappings updated to be available after indexing documents. This commit reworks them to instead use search and check what gets returned instead of checking what get mappings returns and doing a string comparison.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When we introduced dynamic:runtime (#65489) we decided to have it create objects dynamically under properties, as the runtime section did not (and still does not) support object fields. That proved to be a poor choice, because the runtime section is flat, supports dots in field names, and does not really need objects. Also, these end up causing unnecessary mapping conflicts.
With this commit we adapt dynamic:runtime to not dynamically create objects.