diff options
author | gjoranv <gv@verizonmedia.com> | 2020-05-22 19:13:21 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-05-22 19:13:21 +0200 |
commit | 4866c4fd7f7011310067a288624b355a850ff547 (patch) | |
tree | a292dfe673d180cade1434d4e91678f2bda07181 /config-model | |
parent | dcb4ebbc9dc77f8929ff2319a65fe7e528cf1ea9 (diff) |
Instantiate registry from search-and-docproc bundle
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java index 8002f89a2e7..5b9a4775db4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java @@ -1,7 +1,9 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container.search; +import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.container.QrSearchersConfig; +import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.prelude.semantics.SemanticRulesConfig; import com.yahoo.search.config.IndexInfoConfig; import com.yahoo.search.pagetemplates.PageTemplatesConfig; @@ -9,8 +11,8 @@ import com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry; import com.yahoo.search.query.profile.config.QueryProfilesConfig; import com.yahoo.vespa.configdefinition.IlscriptsConfig; import com.yahoo.vespa.model.container.ApplicationContainerCluster; +import com.yahoo.vespa.model.container.component.Component; import com.yahoo.vespa.model.container.component.ContainerSubsystem; -import com.yahoo.vespa.model.container.component.SimpleComponent; import com.yahoo.vespa.model.container.search.searchchain.LocalProvider; import com.yahoo.vespa.model.container.search.searchchain.SearchChains; import com.yahoo.vespa.model.search.AbstractSearchCluster; @@ -23,6 +25,8 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import static com.yahoo.vespa.model.container.xml.BundleMapper.searchAndDocprocBundle; + /** * @author gjoranv * @author Tony Vaagenes @@ -51,7 +55,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> this.owningCluster = cluster; this.options = options; - owningCluster.addComponent(new SimpleComponent(QUERY_PROFILE_REGISTRY_CLASS)); + owningCluster.addComponent(queryProfileRegistryComponent()); } public void connectSearchClusters(Map<String, AbstractSearchCluster> searchClusters) { @@ -60,6 +64,10 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> initializeSearchChains(searchClusters); } + private static Component<AbstractConfigProducer<?>, ComponentModel> queryProfileRegistryComponent() { + return new Component<>(new ComponentModel(QUERY_PROFILE_REGISTRY_CLASS, null, searchAndDocprocBundle)); + } + /** Adds a Dispatcher component to the owning container cluster for each search cluster */ private void initializeDispatchers(Collection<AbstractSearchCluster> searchClusters) { for (AbstractSearchCluster searchCluster : searchClusters) { |