Class TruncateHitsResponseProcessor
java.lang.Object
org.opensearch.search.pipeline.AbstractProcessor
org.opensearch.search.pipeline.common.TruncateHitsResponseProcessor
- All Implemented Interfaces:
Processor,SearchResponseProcessor,StatefulSearchResponseProcessor
public class TruncateHitsResponseProcessor
extends AbstractProcessor
implements StatefulSearchResponseProcessor
Truncates the returned search hits from the
SearchResponse. If no target size is specified in the pipeline, then
we try using the "original_size" value from the request context, which may have been set by OversampleRequestProcessor.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.search.pipeline.Processor
Processor.PipelineContext, Processor.PipelineSource -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetType()processResponse(SearchRequest request, SearchResponse response, PipelineProcessingContext requestContext) 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, isIgnoreFailureMethods inherited from interface org.opensearch.search.pipeline.SearchResponseProcessor
processResponseAsyncMethods inherited from interface org.opensearch.search.pipeline.StatefulSearchResponseProcessor
processResponse
-
Field Details
-
TYPE
Key to reference this processor type from a search pipeline.- See Also:
-
-
Method Details
-
getType
-
processResponse
public SearchResponse processResponse(SearchRequest request, SearchResponse response, PipelineProcessingContext requestContext) - Specified by:
processResponsein interfaceSearchResponseProcessor- Specified by:
processResponsein interfaceStatefulSearchResponseProcessor
-