Skip to content

Conversation

@jdconrad
Copy link
Contributor

Backports the following commits to 7.x:

This change updates the Painless fields API to use mapped types instead of Java types. For this initial
release we only support unsigned long field.

As we now intend to do conversions solely on the field classes themselves, converters and field values
have been removed. Instead of using field values potentially as source fallback we will now rely on
whatever class is passed into the script to support the field method. In the future, this method will
need to check if a field exists on doc and if not, then do source fallback itself once that feature is
supported.

The path to retrieve a field is also different. Instead of using script doc values we now have our own
way to retrieve the fields with a getScriptField method added to LeafDocLookup. This allows us less
restrictive design space to generate the field type based the type in the leaf doc lookup; however, this
will still require additional information that we need to plumb through for certain field types. Once we
support all the field types this makes it easier to deprecate and remove script doc values.
@jdconrad jdconrad merged commit bbd48ee into elastic:7.x Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant