diff options
3 files changed, 10 insertions, 2 deletions
diff --git a/container-search/abi-spec.json b/container-search/abi-spec.json index 66502b62ee8..0f55f777250 100644 --- a/container-search/abi-spec.json +++ b/container-search/abi-spec.json @@ -7741,6 +7741,7 @@ "methods": [ "public void <init>(com.yahoo.container.core.ChainsConfig, com.yahoo.search.config.IndexInfoConfig, com.yahoo.container.QrSearchersConfig, com.yahoo.component.provider.ComponentRegistry, com.yahoo.vespa.configdefinition.SpecialtokensConfig, com.yahoo.language.Linguistics, com.yahoo.component.provider.ComponentRegistry)", "public com.yahoo.search.searchchain.Execution newExecution(com.yahoo.component.chain.Chain)", + "public com.yahoo.search.searchchain.Execution newExecution(java.lang.String)", "public com.yahoo.search.searchchain.SearchChainRegistry searchChainRegistry()", "public com.yahoo.search.rendering.RendererRegistry rendererRegistry()", "public void deconstruct()", diff --git a/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java b/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java index c619bf69e59..31b6d06f78e 100644 --- a/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java +++ b/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java @@ -66,6 +66,15 @@ public class ExecutionFactory extends AbstractComponent { new Execution.Context(searchChainRegistry, indexFacts, specialTokens, rendererRegistry, linguistics)); } + /** + * Creates a new execution starting at a search chain. + * An execution instance should be used once to execute a (tree of) search chains. + */ + public Execution newExecution(String searchChainId) { + return new Execution(searchChainRegistry().getChain(searchChainId), + new Execution.Context(searchChainRegistry, indexFacts, specialTokens, rendererRegistry, linguistics)); + } + /** Returns the search chain registry used by this */ public SearchChainRegistry searchChainRegistry() { return searchChainRegistry; } diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/Submission.java b/hosted-api/src/main/java/ai/vespa/hosted/api/Submission.java index 8205e8a1b9b..fe2dbaf977e 100644 --- a/hosted-api/src/main/java/ai/vespa/hosted/api/Submission.java +++ b/hosted-api/src/main/java/ai/vespa/hosted/api/Submission.java @@ -1,8 +1,6 @@ // Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package ai.vespa.hosted.api; -import java.io.File; -import java.io.InputStream; import java.nio.file.Path; import java.util.OptionalLong; |