Class ScriptRequestProcessor
java.lang.Object
org.opensearch.search.pipeline.AbstractProcessor
org.opensearch.search.pipeline.common.ScriptRequestProcessor
- All Implemented Interfaces:
Processor,SearchRequestProcessor
public final class ScriptRequestProcessor
extends AbstractProcessor
implements SearchRequestProcessor
Processor that evaluates a script with a search request in its context
and then returns the modified search request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFactory class for creatingScriptRequestProcessor.Nested classes/interfaces inherited from interface org.opensearch.search.pipeline.Processor
Processor.PipelineContext, Processor.PipelineSource -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey to reference this processor type from a search pipeline.Fields inherited from interface org.opensearch.search.pipeline.Processor
PIPELINE_SOURCE -
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns the type of the processor.processRequest(SearchRequest request) Executes the script with the search request in context.Methods inherited from class org.opensearch.search.pipeline.AbstractProcessor
getDescription, getTag, isIgnoreFailureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.search.pipeline.Processor
getDescription, getTag, isIgnoreFailure
-
Field Details
-
TYPE
Key to reference this processor type from a search pipeline.- See Also:
-
-
Method Details
-
processRequest
Executes the script with the search request in context.- Specified by:
processRequestin interfaceSearchRequestProcessor- Parameters:
request- The search request passed into the script context.- Returns:
- The modified search request.
- Throws:
Exception- if an error occurs while processing the request.
-
getType
Returns the type of the processor.
-