MINOR: Remove Dead Code in SearchScript (#33569)
* `lookup` is not used anywhere * `getLeafContext` is not used anywhere
This commit is contained in:
parent
079d130d8c
commit
9a2c77d1c3
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -76,11 +68,6 @@ public abstract class SearchScript implements ScorerAware, ExecutableScript {
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue