diff options
author | Ryan Ernst <ryan@iernst.net> | 2017-06-09 08:29:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-09 08:29:25 -0700 |
commit | a03b6c2fa556668c94366d47ff374cf719a659fd (patch) | |
tree | 1564dbdfa264e7deddfc6d49ed80e5e47cb180ab /core/src/test/java/org/elasticsearch/search | |
parent | 29502107b9fc49d2555ce7a6c7bf3bb0eac651db (diff) |
Scripting: Change keys for inline/stored scripts to source/id (#25127)
This commit adds back "id" as the key within a script to specify a
stored script (which with file scripts now gone is no longer ambiguous).
It also adds "source" as a replacement for "code". This is in an attempt
to normalize how scripts are specified across both put stored scripts and script usages, including search template requests. This also deprecates the old inline/stored keys.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search')
-rw-r--r-- | core/src/test/java/org/elasticsearch/search/sort/ScriptSortBuilderTests.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/sort/ScriptSortBuilderTests.java b/core/src/test/java/org/elasticsearch/search/sort/ScriptSortBuilderTests.java index 2ed8857f12..121085f34d 100644 --- a/core/src/test/java/org/elasticsearch/search/sort/ScriptSortBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/search/sort/ScriptSortBuilderTests.java @@ -158,7 +158,7 @@ public class ScriptSortBuilderTests extends AbstractSortTestCase<ScriptSortBuild "\"_script\" : {\n" + "\"type\" : \"number\",\n" + "\"script\" : {\n" + - "\"inline\": \"doc['field_name'].value * factor\",\n" + + "\"source\": \"doc['field_name'].value * factor\",\n" + "\"params\" : {\n" + "\"factor\" : 1.1\n" + "}\n" + |