Skip to content

Commit

Permalink
code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
masseyke committed Oct 12, 2023
1 parent 036e58b commit 8e295cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,12 @@ public void addPipeline(String pipeline) {
}
}

/**
* This returns the list of pipelines executed on the document for this request. If listExecutedPipelines is false, the response will be
* null, even if pipelines were executed. If listExecutedPipelines is true but no pipelines were executed, the list will be empty.
* @return
*/
@Nullable
public List<String> getExecutedPipelines() {
if (listExecutedPipelines == false) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,12 @@ private void executePipelines(

// reset the reroute flag, at the start of a new pipeline execution this document hasn't been rerouted yet
ingestDocument.resetReroute();
indexRequest.addPipeline(pipelineId);

try {
if (pipeline == null) {
throw new IllegalArgumentException("pipeline with id [" + pipelineId + "] does not exist");
}

indexRequest.addPipeline(pipelineId);
final String originalIndex = indexRequest.indices()[0];
executePipeline(ingestDocument, pipeline, (keep, e) -> {
assert keep != null;
Expand Down

0 comments on commit 8e295cf

Please sign in to comment.