From b992fa1347882e4c1f9516dfcdff4d60bf4bf0ca Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Tue, 21 Nov 2023 12:30:13 +0000 Subject: check all rank profiles of schema for global-phase --- .../yahoo/vespa/model/container/search/ContainerSearch.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'config-model/src') 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 6e4c14bdeac..36b6d0fe07a 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 @@ -25,6 +25,7 @@ import com.yahoo.vespa.model.search.SearchCluster; import com.yahoo.vespa.model.search.StreamingSearchCluster; import java.util.Collection; +import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -72,8 +73,15 @@ public class ContainerSearch extends ContainerSubsystem } private static Collection getSchemasWithGlobalPhase(DeployState state) { - return state.rankProfileRegistry().all().stream() - .filter(rp -> rp.getGlobalPhase() != null).map(rp -> rp.schema().getName()).collect(Collectors.toSet()); + var res = new HashSet(); + for (var schema : state.getSchemas()) { + for (var rp : state.rankProfileRegistry().rankProfilesOf(schema)) { + if (rp.getGlobalPhase() != null) { + res.add(schema.getName()); + } + } + } + return res; } public void connectSearchClusters(Map searchClusters) { -- cgit v1.2.3