summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java
diff options
context:
space:
mode:
authorRyan Ernst <ryan@iernst.net>2017-05-25 12:18:45 -0700
committerGitHub <noreply@github.com>2017-05-25 12:18:45 -0700
commit8aaea51a0a0d822e67404e3af6b970e8a323b877 (patch)
tree1d008a9db65c784419fe6edfcb93e365bc103c7e /core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java
parent59c052e76f7428427c8f7e995285bd0b05e82c08 (diff)
Scripting: Move context definitions to instance type classes (#24883)
This is a simple refactoring to move the context definitions into the type that they use. While we have multiple context names for the same class at the moment, this will eventually become one ScriptContext per instance type, so the pattern of a static member on the interface called CONTEXT can be used. This commit also moves the consolidated list of contexts provided by core ES into ScriptModule.
Diffstat (limited to 'core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java')
-rw-r--r--core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java
index c775cc8149..269021fd46 100644
--- a/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java
+++ b/core/src/main/java/org/elasticsearch/search/sort/ScriptSortBuilder.java
@@ -242,7 +242,7 @@ public class ScriptSortBuilder extends SortBuilder<ScriptSortBuilder> {
@Override
public SortFieldAndFormat build(QueryShardContext context) throws IOException {
- final SearchScript searchScript = context.getSearchScript(script, ScriptContext.SEARCH);
+ final SearchScript searchScript = context.getSearchScript(script, SearchScript.CONTEXT);
MultiValueMode valueMode = null;
if (sortMode != null) {