diff options
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java index a8605ab1597..0d9935af43d 100644 --- a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java +++ b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java @@ -136,13 +136,13 @@ public class ClusterSearcher extends Searcher { SummaryParameters docSumParams, DocumentdbInfoConfig documentdbInfoConfig, SchemaInfo schemaInfo, - ComponentRegistry<Dispatcher> dispatchers) { + ComponentRegistry<Dispatcher> dispatchers) + { ClusterParams clusterParams = makeClusterParams(searchclusterIndex); ComponentId dispatcherComponentId = new ComponentId("dispatcher." + searchClusterName); Dispatcher dispatcher = dispatchers.getComponent(dispatcherComponentId); if (dispatcher == null) - throw new IllegalArgumentException("Configuration error: No dispatcher " + dispatcherComponentId + - " is configured"); + throw new IllegalArgumentException("Configuration error: No dispatcher " + dispatcherComponentId + " is configured"); return new IndexedBackend(serverId, dispatcher, docSumParams, clusterParams, documentdbInfoConfig, schemaInfo); } @@ -152,10 +152,8 @@ public class ClusterSearcher extends Searcher { SummaryParameters docSumParams, DocumentdbInfoConfig documentdbInfoConfig, SchemaInfo schemaInfo, - VespaDocumentAccess access) { - if (searchClusterConfig.searchdef().size() != 1) - throw new IllegalArgumentException("Streaming search clusters can only contain a single schema but got " + - searchClusterConfig.searchdef()); + VespaDocumentAccess access) + { ClusterParams clusterParams = makeClusterParams(searchclusterIndex); StreamingBackend searcher = new StreamingBackend(access); searcher.setSearchClusterName(searchClusterConfig.rankprofiles_configid()); |