diff --git a/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java index 4e3547ea00d..6552262e253 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/watcher/transform/search/ExecutableSearchTransform.java @@ -11,9 +11,9 @@ import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchType; import org.elasticsearch.client.Client; -import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.unit.TimeValue; +import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.script.Script; import org.elasticsearch.xpack.watcher.execution.WatchExecutionContext; import org.elasticsearch.xpack.watcher.support.search.WatcherSearchTemplateRequest; @@ -23,6 +23,8 @@ import org.elasticsearch.xpack.watcher.watch.Payload; import java.util.concurrent.TimeUnit; +import static org.elasticsearch.xpack.ClientHelper.WATCHER_ORIGIN; +import static org.elasticsearch.xpack.ClientHelper.stashWithOrigin; import static org.elasticsearch.xpack.watcher.transform.search.SearchTransform.TYPE; public class ExecutableSearchTransform extends ExecutableTransform { @@ -49,9 +51,11 @@ public class ExecutableSearchTransform extends ExecutableTransform) () -> new ParameterizedMessage("failed to execute [{}] transform for [{}]", TYPE, ctx.id()), e); return new SearchTransform.Result(request, e);