Is your feature request related to a problem? Please describe
When developing my own script engine, I want to retrieve value from the source for field of text type. However, the super class like FilterScript only has doc value related API exposed:
|
/** The doc lookup for the Lucene segment this script was created for. */ |
|
public final Map<String, ScriptDocValues<?>> getDoc() { |
|
return leafLookup.doc(); |
|
} |
|
|
although the leafLookup already has source related API exposed:
|
public SourceLookup source() { |
|
return this.sourceLookup; |
|
} |
|
|
Describe the solution you'd like
Add a new method in FilterScript, AggregationScript and etc. to expose the SourceLookup of LeafSearchLookup:
public final SourceLookup getSource() {
return leafLookup.source();
}
Related component
Plugins
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem? Please describe
When developing my own script engine, I want to retrieve value from the source for field of text type. However, the super class like
FilterScriptonly has doc value related API exposed:OpenSearch/server/src/main/java/org/opensearch/script/FilterScript.java
Lines 72 to 76 in be8bbe1
although the leafLookup already has source related API exposed:
OpenSearch/server/src/main/java/org/opensearch/search/lookup/LeafSearchLookup.java
Lines 75 to 78 in be8bbe1
Describe the solution you'd like
Add a new method in
FilterScript,AggregationScriptand etc. to expose theSourceLookupofLeafSearchLookup:Related component
Plugins
Describe alternatives you've considered
No response
Additional context
No response