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

Scripting: Add optional context parameter to put stored script requests #25014

Merged
merged 3 commits into from Jun 2, 2017

Conversation

Projects
None yet
5 participants
@rjernst
Copy link
Member

commented Jun 1, 2017

This commit adds an optional context url parameter to the put stored
script request. When a context is specified, the script is compiled
against that context before storing, as a validation the script will
work when used in that context.

Scripting: Add optional context parameter to put stored script requests
This commit adds an optional `context` url parameter to the put stored
script request. When a context is specified, the script is compiled
against that context before storing, as a validation the script will
work when used in that context.
@jdconrad
Copy link
Contributor

left a comment

LGTM

@nik9000

nik9000 approved these changes Jun 1, 2017

private BytesReference content;
private XContentType xContentType;

public PutStoredScriptRequest() {
super();
}

public PutStoredScriptRequest(String id, String lang, BytesReference content, XContentType xContentType) {
public PutStoredScriptRequest(String id, String lang, String context, BytesReference content, XContentType xContentType) {

This comment has been minimized.

Copy link
@nik9000

nik9000 Jun 1, 2017

Contributor

@Nullable on context I think.

This comment has been minimized.

Copy link
@rjernst

rjernst Jun 1, 2017

Author Member

I don't think nullable buys anything.

rjernst added some commits Jun 1, 2017

@rjernst rjernst merged commit 8d88b94 into elastic:master Jun 2, 2017

2 checks passed

CLA Commit author is a member of Elasticsearch
Details
elasticsearch-ci Build finished.
Details

@rjernst rjernst deleted the rjernst:script18 branch Jun 2, 2017

jasontedor added a commit to s12v/elasticsearch that referenced this pull request Jun 2, 2017

Merge branch 'master' into patch-1
* master: (62 commits)
  Handle already closed while filling gaps
  [DOCS] Clarify behaviour of scripted-metric arg with empty parent buckets
  [DOCS] Clarify connections and gateway nodes selection in cross cluster search docs (elastic#24859)
  Java api: Remove unneeded getTookInMillis method (elastic#23923)
  Adds nodes usage API to monitor usages of actions (elastic#24169)
  Add superset size to Significant Term REST response (elastic#24865)
  Disallow multiple parent-join fields per mapping (elastic#25002)
  [Test] Remove unused test resources in core (elastic#25011)
  Scripting: Add optional context parameter to put stored script requests (elastic#25014)
  Extract a common base class for scroll executions (elastic#24979)
  Build: fix version sorting
  Build: Move verifyVersions to new branchConsistency task (elastic#25009)
  Add backwards compatibility indices
  Build: improve verifyVersions error message (elastic#25006)
  Add version 5.4.2 constant
  Docs: More search speed advices. (elastic#24802)
  Add version 5.3.3 constant
  Reorganize docs of global ordinals. (elastic#24982)
  Provide the TransportRequest during validation of a search context (elastic#24985)
  [TEST] fix SearchIT assertion to also accept took set to 0
  ...

@colings86 colings86 added v6.0.0-beta1 and removed v6.0.0 labels Aug 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.