Package org.opensearch.search.pipeline
Interface StatefulSearchResponseProcessor
- All Superinterfaces:
Processor
,SearchResponseProcessor
A specialization of
SearchResponseProcessor
that makes use of the request-scoped processor state.
Implementors must implement the processResponse method that accepts request-scoped processor state.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.search.pipeline.Processor
Processor.Factory<T extends Processor>, Processor.PipelineContext, Processor.PipelineSource
-
Method Summary
Modifier and TypeMethodDescriptiondefault SearchResponse
processResponse
(SearchRequest request, SearchResponse response) Transform aSearchResponse
, possibly based on the executedSearchRequest
.processResponse
(SearchRequest request, SearchResponse response, PipelineProcessingContext requestContext) Process a SearchResponse, with request-scoped state shared across processors in the pipelineMethods inherited from interface org.opensearch.search.pipeline.Processor
getDescription, getTag, getType, isIgnoreFailure
Methods inherited from interface org.opensearch.search.pipeline.SearchResponseProcessor
processResponseAsync
-
Method Details
-
processResponse
Description copied from interface:SearchResponseProcessor
Transform aSearchResponse
, possibly based on the executedSearchRequest
.Implement this method if the processor makes no asynchronous calls.
- Specified by:
processResponse
in interfaceSearchResponseProcessor
- Parameters:
request
- the executedSearchRequest
response
- the currentSearchResponse
, possibly modified by earlier processors- Returns:
- a modified
SearchResponse
(or the inputSearchResponse
if no changes)
-
processResponse
SearchResponse processResponse(SearchRequest request, SearchResponse response, PipelineProcessingContext requestContext) throws Exception Description copied from interface:SearchResponseProcessor
Process a SearchResponse, with request-scoped state shared across processors in the pipelineImplement this method if the processor makes no asynchronous calls.
- Specified by:
processResponse
in interfaceSearchResponseProcessor
- Parameters:
request
- the (maybe transformed) search requestresponse
- the search response (which may have been modified by an earlier processor)requestContext
- request-scoped state shared across processors in the pipeline- Returns:
- the modified search response
- Throws:
Exception
- implementation-specific processing exception
-