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, 7 insertions, 4 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 68f8bd9d9ea..ac02b5f8e5e 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,6 +54,8 @@ public class FastSearcher extends VespaBackEndSearcher {
private final Backend dispatchBackend;
+ private final FS4InvokerFactory fs4InvokerFactory;
+
/**
* Creates a Fastsearcher.
*
@@ -75,6 +77,7 @@ 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);
}
/**
@@ -206,14 +209,14 @@ public class FastSearcher extends VespaBackEndSearcher {
* on the same host.
*/
private SearchInvoker getSearchInvoker(Query query) {
- Optional<SearchInvoker> invoker = dispatcher.getSearchInvoker(query, this);
+ Optional<SearchInvoker> invoker = dispatcher.getSearchInvoker(query, fs4InvokerFactory);
if (invoker.isPresent()) {
return invoker.get();
}
Optional<Node> direct = getDirectNode(query);
if(direct.isPresent()) {
- return dispatcher.getFS4InvokerFactory().createSearchInvoker(this, query, direct.get());
+ return fs4InvokerFactory.getSearchInvoker(query, direct.get());
}
return new FS4SearchInvoker(this, query, dispatchBackend.openChannel(), Optional.empty());
}
@@ -225,14 +228,14 @@ public class FastSearcher extends VespaBackEndSearcher {
*/
private FillInvoker getFillInvoker(Result result) {
Query query = result.getQuery();
- Optional<FillInvoker> invoker = dispatcher.getFillInvoker(result, this);
+ Optional<FillInvoker> invoker = dispatcher.getFillInvoker(result, this, getDocumentDatabase(query), fs4InvokerFactory);
if (invoker.isPresent()) {
return invoker.get();
}
Optional<Node> direct = getDirectNode(query);
if (direct.isPresent()) {
- return dispatcher.getFS4InvokerFactory().createFillInvoker(this, result, direct.get());
+ return fs4InvokerFactory.getFillInvoker(query, direct.get());
}
return new FS4FillInvoker(this, query, dispatchBackend);
}