-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Scripting: Convert script fields to use script context #34164
Conversation
This commit removes the use of SearchScript for script fields and adds a new FieldScript.
Pinging @elastic/es-core-infra |
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.
LGTM. Thanks for doing this!
@@ -14,18 +14,15 @@ a customized value for each document in the results of a query. | |||
Contains the fields of the specified document where each field is a | |||
`List` of values. | |||
|
|||
{ref}/mapping-source-field.html[`ctx['_source']`] (`Map`):: | |||
{ref}/mapping-source-field.html[`params['_source']`] (`Map`):: |
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.
Do you mind adding read-only to this, like how _score was? This shouldn't be modified as part of a script field. My mistake from the first iteration of these docs.
Map<String, String> deprecations = new HashMap<>(); | ||
deprecations.put( | ||
"doc", | ||
"Accessing variable [doc] via [params.doc] from within a terms-set-query-script " + |
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.
Think this was a copy and paste issue -- should be field-script and not terms-set-query
* master: Use trial license in docs tests (elastic#34673) Scripting: Convert script fields to use script context (elastic#34164) TEST: Mute testDedupByPrimaryTerm ingest: processor stats (elastic#34202)
This commit removes the use of SearchScript for script fields and adds a new FieldScript.
This commit removes the use of SearchScript for script fields and adds
a new FieldScript.