summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-05-28 15:12:02 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-05-28 15:12:02 +0000
commitf5a172a11f6ed80c606ca8f8bd3600e1d499d0b4 (patch)
treebd81b4a3e118da8dc4e59ce29d1477835e672ddb /container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
parent01b28baa634e2e6c1b9e6830df74a9fd6f208e04 (diff)
Allow from 5% skew in document distribution and still get good results when asking for many hits.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
index 7dfc03fd2d7..2f62b07ac04 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/SearchCluster.java
@@ -41,6 +41,7 @@ public class SearchCluster implements NodeManager<Node> {
private final PingFactory pingFactory;
private final TopKEstimator hitEstimator;
private long nextLogTime = 0;
+ private static final double SKEW_FACTOR = 0.05;
/**
* A search node on this local machine having the entire corpus, which we therefore
@@ -78,7 +79,7 @@ public class SearchCluster implements NodeManager<Node> {
for (Node node : nodes)
nodesByHostBuilder.put(node.hostname(), node);
this.nodesByHost = nodesByHostBuilder.build();
- hitEstimator = new TopKEstimator(30.0, dispatchConfig.topKProbability());
+ hitEstimator = new TopKEstimator(30.0, dispatchConfig.topKProbability(), SKEW_FACTOR);
this.localCorpusDispatchTarget = findLocalCorpusDispatchTarget(HostName.getLocalhost(),
size,