From 4c2f86281542b752785d75f2f5eb8000ea9abf0f Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 7 Oct 2021 11:01:01 +0200 Subject: Execute a query over multiple document types in the same content cluster in parallel towards the backend. --- .../java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java') diff --git a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java index 38c231cb1bb..361c1ed9692 100644 --- a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java +++ b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java @@ -4,6 +4,7 @@ package com.yahoo.prelude.cluster; import com.google.common.collect.ImmutableList; import com.yahoo.component.ComponentId; import com.yahoo.component.provider.ComponentRegistry; +import com.yahoo.concurrent.InThreadExecutorService; import com.yahoo.container.QrConfig; import com.yahoo.container.QrSearchersConfig; import com.yahoo.container.handler.ClustersStatus; @@ -263,9 +264,10 @@ public class ClusterSearcherTestCase { private Execution createExecution(List docTypesList, boolean expectAttributePrefetch) { Set documentTypes = new LinkedHashSet<>(docTypesList); - ClusterSearcher cluster = new ClusterSearcher(documentTypes); + ClusterSearcher cluster = new ClusterSearcher(documentTypes, + new MyMockSearcher(expectAttributePrefetch), + new InThreadExecutorService()); try { - cluster.addBackendSearcher(new MyMockSearcher(expectAttributePrefetch)); cluster.setValidRankProfile("default", documentTypes); cluster.addValidRankProfile("testprofile", "type1"); return new Execution(cluster, Execution.Context.createContextStub()); @@ -523,6 +525,7 @@ public class ClusterSearcherTestCase { dispatchers.register(new ComponentId("dispatcher." + clusterName), dispatcher); return new ClusterSearcher(new ComponentId("test-id"), + new InThreadExecutorService(), qrSearchersConfig.build(), clusterConfig.build(), documentDbConfig.build(), -- cgit v1.2.3