Skip to content

Rename string_field script context to keyword_field #71854

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

Merged

Conversation

javanna
Copy link
Member

@javanna javanna commented Apr 19, 2021

Up until now, the name of the script contexts that runtime fields use was internal only. They recently got exposed through the painless execute API. This commit fixes the discrepancy between the field type used to define a runtime field of type keyword and the script context needed to simulate its corresponding script: string_field should be keyword_field.

Up until now, the name of the script contexts that runtime fields use was internal only. They recently got exposed through the painless execute API. This commit fixes the discrepancy between the field type used to define a runtime field of type keyword and the script context needed to simulate its corresponding script: string_field should be keyword_field.
@javanna javanna added >enhancement :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache v8.0.0 v7.13.0 labels Apr 19, 2021
@javanna javanna requested review from nik9000 and jdconrad April 19, 2021 15:44
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Apr 19, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I figure if we end up adding other string-valued runtime fields we can figure out what to do then.

Copy link
Contributor

@jdconrad jdconrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this!

@javanna
Copy link
Member Author

javanna commented Apr 19, 2021

the rest-compat tests here are expected to fail, because the tests from 7.x use string_field that we are renaming to keyword_field in master with this change. This is ok though because painless execute does not support the runtime fields context in any public release, so we are ok breaking this between 7.x and master.

javanna added a commit to javanna/elasticsearch that referenced this pull request Apr 20, 2021
The script context is being renamed as part of elastic#71854, which is not a breaking change as we have not released a public version that supports such new context in the painless execute API. We will re-enable these tests once the linked PR is merged.
javanna added a commit that referenced this pull request Apr 20, 2021
The script context is being renamed as part of #71854, which is not a breaking change as we have not released a public version that supports such new context in the painless execute API. We will re-enable these tests once the linked PR is merged.
@javanna
Copy link
Member Author

javanna commented Apr 20, 2021

run elasticsearch-ci/rest-compat

@javanna javanna merged commit 9be4d33 into elastic:master Apr 20, 2021
javanna added a commit to javanna/elasticsearch that referenced this pull request Apr 20, 2021
Up until now, the name of the script contexts that runtime fields use was internal only. They recently got exposed through the painless execute API. This commit fixes the discrepancy between the field type used to define a runtime field of type keyword and the script context needed to simulate its corresponding script: string_field should be keyword_field.
javanna added a commit that referenced this pull request Apr 21, 2021
Up until now, the name of the script contexts that runtime fields use was internal only. They recently got exposed through the painless execute API. This commit fixes the discrepancy between the field type used to define a runtime field of type keyword and the script context needed to simulate its corresponding script: string_field should be keyword_field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement Team:Core/Infra Meta label for core/infra team v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants