Skip to content
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

Standardize runtime field emit methods #61752

Merged

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Aug 31, 2020

This standardizes that name for all of the "emit value" methods used by
runtime field scripts to emitValue. To make dates possible this adds a
a toEpochMilli method to convert from TemporalAccessor into millis
since epoch.

This standardizes that name for all of the "emit value" methods used by
runtime field scripts to `emitValue`. To make dates possible this adds a
a `toEpochMilli` method to convert from `TemporalAccessor` into millis
since epoch.
@nik9000 nik9000 added the :Search/Search Search-related issues that do not fall into other categories label Aug 31, 2020
@nik9000 nik9000 requested a review from javanna August 31, 2020 18:22
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Aug 31, 2020
@javanna javanna mentioned this pull request Aug 31, 2020
30 tasks
Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

LGTM, only one question: with this every context supports one return type, and some types require conversions through specific function calls to adapt values to the required return type? I guess with this I am double checking that emitValue always and only accept one argument type per context.

@nik9000
Copy link
Member Author

nik9000 commented Aug 31, 2020

with this every context supports one return type, and some types require conversions through specific function calls to adapt values to the required return type? I guess with this I am double checking that emitValue always and only accept one argument type per context.

All correct. Painless itself doesn't have support for arguments with different types so we just pick a "native" type for each.

@nik9000 nik9000 merged commit 0284f3d into elastic:feature/runtime_fields Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants