Skip to content

Commit

Permalink
addressed comments 1. removed unnecessary log
Browse files Browse the repository at this point in the history
Signed-off-by: Junwei Dai <[email protected]>
  • Loading branch information
Junwei Dai committed Jan 22, 2025
1 parent 42e50d0 commit 5f404e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ public ActionListener<SearchResponse> transformResponseListener(ActionListener<S
return pipeline.transformResponseListener(this, ActionListener.wrap(response -> {
// Extract processor execution details
List<ProcessorExecutionDetail> details = requestContext.getProcessorExecutionDetails();
logger.info("it is going to be executed in [{}]", details);
// Add details to the response's InternalResponse if available
if (!details.isEmpty() && response.getInternalResponse() != null) {
response.getInternalResponse().getProcessorResult().addAll(details);
}

// Pass the modified response to the original listener
responseListener.onResponse(response);
}, responseListener::onFailure), requestContext);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,10 @@ public int hashCode() {
* or encountered a failure during its execution. It helps in categorizing the
* execution result of processors within a pipeline.
*
* @opensearch.internal
* @since 2.19.0
*/
@PublicApi(since = "2.19.0")
public enum ProcessorStatus {
SUCCESS,
FAIL
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,10 @@ public PipelinedRequest resolvePipeline(SearchRequest searchRequest, IndexNameEx
pipeline = pipelineHolder.pipeline;
}
}
if (searchRequest.source() != null && searchRequest.source().verbosePipeline() && pipeline.getId().equals(NOOP_PIPELINE_ID)) {
throw new IllegalArgumentException("The 'verbose pipelines' option requires a search pipeline to be defined.");
if (searchRequest.source() != null
&& searchRequest.source().verbosePipeline()
&& NOOP_PIPELINE_ID.equals(pipeline.getId()) == true) {
throw new IllegalArgumentException("The 'verbose pipeline' option requires a search pipeline to be defined.");
}
PipelineProcessingContext requestContext = new PipelineProcessingContext();
return new PipelinedRequest(pipeline, searchRequest, requestContext);
Expand Down

0 comments on commit 5f404e7

Please sign in to comment.