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.
  • Field Details

  • Method Details

    • processRequest

      public SearchRequest processRequest(SearchRequest request) throws Exception
      Executes the script with the search request in context.
      Specified by:
      processRequest in interface SearchRequestProcessor
      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

      public String getType()
      Returns the type of the processor.
      Specified by:
      getType in interface Processor
      Returns:
      The processor type.