Skip to content

Dynamic runtime to not dynamically create objects#74234

Merged
javanna merged 2 commits intoelastic:masterfrom
javanna:fix/dynamic_runtime_no_objects
Jun 18, 2021
Merged

Dynamic runtime to not dynamically create objects#74234
javanna merged 2 commits intoelastic:masterfrom
javanna:fix/dynamic_runtime_no_objects

Conversation

@javanna
Copy link
Copy Markdown
Contributor

@javanna javanna commented Jun 17, 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.

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.
@javanna javanna added >bug :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.14.0 labels Jun 17, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 17, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Copy Markdown
Contributor

@romseygeek romseygeek left a 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.

Copy link
Copy Markdown
Contributor

@jtibshirani jtibshirani left a 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.

@javanna javanna merged commit 1d88fe6 into elastic:master Jun 18, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.14.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants