summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java b/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java
index 6030e989595..1c3a90ac6ab 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/InvokerFactory.java
@@ -27,7 +27,10 @@ public abstract class InvokerFactory {
this.searchCluster = searchCluster;
}
- protected abstract Optional<SearchInvoker> createNodeSearchInvoker(VespaBackEndSearcher searcher, Query query, Node node);
+ protected abstract Optional<SearchInvoker> createNodeSearchInvoker(VespaBackEndSearcher searcher,
+ Query query,
+ int maxHits,
+ Node node);
public abstract FillInvoker createFillInvoker(VespaBackEndSearcher searcher, Result result);
@@ -47,13 +50,14 @@ public abstract class InvokerFactory {
Query query,
OptionalInt groupId,
List<Node> nodes,
- boolean acceptIncompleteCoverage) {
+ boolean acceptIncompleteCoverage,
+ int maxHits) {
List<SearchInvoker> invokers = new ArrayList<>(nodes.size());
Set<Integer> failed = null;
for (Node node : nodes) {
boolean nodeAdded = false;
if (node.isWorking() != Boolean.FALSE) {
- Optional<SearchInvoker> invoker = createNodeSearchInvoker(searcher, query, node);
+ Optional<SearchInvoker> invoker = createNodeSearchInvoker(searcher, query, maxHits, node);
if (invoker.isPresent()) {
invokers.add(invoker.get());
nodeAdded = true;