summaryrefslogtreecommitdiff
path: root/core/src/main/java/org/elasticsearch/search/suggest
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/suggest
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/suggest')
-rw-r--r--core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java b/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java
index 1319679f1a..1194488e50 100644
--- a/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java
+++ b/core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java
@@ -631,7 +631,7 @@ public class PhraseSuggestionBuilder extends SuggestionBuilder<PhraseSuggestionB
if (this.collateQuery != null) {
Function<Map<String, Object>, ExecutableScript> compiledScript = context.getLazyExecutableScript(this.collateQuery,
- ScriptContext.EXECUTABLE);
+ ExecutableScript.CONTEXT);
suggestionContext.setCollateQueryScript(compiledScript);
if (this.collateParams != null) {
suggestionContext.setCollateScriptParams(this.collateParams);