diff --git a/server/src/main/java/org/elasticsearch/script/SearchScript.java b/server/src/main/java/org/elasticsearch/script/SearchScript.java index 43ea020aa6e24..7bef78f9930c4 100644 --- a/server/src/main/java/org/elasticsearch/script/SearchScript.java +++ b/server/src/main/java/org/elasticsearch/script/SearchScript.java @@ -46,12 +46,6 @@ public abstract class SearchScript implements ScorerAware, ExecutableScript { /** The generic runtime parameters for the script. */ private final Map params; - /** A lookup for the index this script will operate on. */ - private final SearchLookup lookup; - - /** A leaf lookup for the bound segment this script will operate on. */ - private final LeafReaderContext leafContext; - /** A leaf lookup for the bound segment this script will operate on. */ private final LeafSearchLookup leafLookup; @@ -60,8 +54,6 @@ public abstract class SearchScript implements ScorerAware, ExecutableScript { public SearchScript(Map params, SearchLookup lookup, LeafReaderContext leafContext) { this.params = params; - this.lookup = lookup; - this.leafContext = leafContext; // TODO: remove leniency when painless does not implement SearchScript for executable script cases this.leafLookup = leafContext == null ? null : lookup.getLeafSearchLookup(leafContext); } @@ -76,11 +68,6 @@ protected final LeafSearchLookup getLeafLookup() { return leafLookup; } - /** The leaf context for the Lucene segment this script was created for. */ - protected final LeafReaderContext getLeafContext() { - return leafContext; - } - /** The doc lookup for the Lucene segment this script was created for. */ public final LeafDocLookup getDoc() { // TODO: remove leniency when painless does not implement SearchScript for executable script cases