aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java')
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java
index ac02b5f8e5e..68f8bd9d9ea 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastSearcher.java
@@ -54,8 +54,6 @@ public class FastSearcher extends VespaBackEndSearcher {
private final Backend dispatchBackend;
- private final FS4InvokerFactory fs4InvokerFactory;
-
/**
* Creates a Fastsearcher.
*
@@ -77,7 +75,6 @@ public class FastSearcher extends VespaBackEndSearcher {
init(fs4ResourcePool.getServerId(), docSumParams, clusterParams, documentdbInfoConfig);
this.dispatchBackend = dispatchBackend;
this.dispatcher = dispatcher;
- this.fs4InvokerFactory = new FS4InvokerFactory(fs4ResourcePool, dispatcher.searchCluster(), this);
}
/**
@@ -209,14 +206,14 @@ public class FastSearcher extends VespaBackEndSearcher {
* on the same host.
*/
private SearchInvoker getSearchInvoker(Query query) {
- Optional<SearchInvoker> invoker = dispatcher.getSearchInvoker(query, fs4InvokerFactory);
+ Optional<SearchInvoker> invoker = dispatcher.getSearchInvoker(query, this);
if (invoker.isPresent()) {
return invoker.get();
}
Optional<Node> direct = getDirectNode(query);
if(direct.isPresent()) {
- return fs4InvokerFactory.getSearchInvoker(query, direct.get());
+ return dispatcher.getFS4InvokerFactory().createSearchInvoker(this, query, direct.get());
}
return new FS4SearchInvoker(this, query, dispatchBackend.openChannel(), Optional.empty());
}
@@ -228,14 +225,14 @@ public class FastSearcher extends VespaBackEndSearcher {
*/
private FillInvoker getFillInvoker(Result result) {
Query query = result.getQuery();
- Optional<FillInvoker> invoker = dispatcher.getFillInvoker(result, this, getDocumentDatabase(query), fs4InvokerFactory);
+ Optional<FillInvoker> invoker = dispatcher.getFillInvoker(result, this);
if (invoker.isPresent()) {
return invoker.get();
}
Optional<Node> direct = getDirectNode(query);
if (direct.isPresent()) {
- return fs4InvokerFactory.getFillInvoker(query, direct.get());
+ return dispatcher.getFS4InvokerFactory().createFillInvoker(this, result, direct.get());
}
return new FS4FillInvoker(this, query, dispatchBackend);
}