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

MINOR: Remove Dead Code in SearchScript #33569

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions server/src/main/java/org/elasticsearch/script/SearchScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ public abstract class SearchScript implements ScorerAware, ExecutableScript {
/** The generic runtime parameters for the script. */
private final Map<String, Object> 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;

Expand All @@ -60,8 +54,6 @@ public abstract class SearchScript implements ScorerAware, ExecutableScript {

public SearchScript(Map<String, Object> 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);
}
Expand All @@ -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
Expand Down