-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Dynamic runtime to not dynamically create objects #74234
Dynamic runtime to not dynamically create objects #74234
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.
Pinging @elastic/es-search (Team:Search) |
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.
Nice! This makes a whole bunch of stuff much simpler.
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.
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.
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
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.
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
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.
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.
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.