summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-11-02 10:07:41 +0100
committerJon Bratseth <bratseth@oath.com>2018-11-02 10:07:41 +0100
commit316bc2cf752f46babafb12e37024a7e77f814b67 (patch)
tree808ed612c1fa8b52ba7b5091251cd4fc647af68d /container-search
parent0af75e190d0dd2f245a63c9bd96175e0da21d056 (diff)
Improve error message etc
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/ranking/SoftTimeout.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/ranking/SoftTimeout.java b/container-search/src/main/java/com/yahoo/search/query/ranking/SoftTimeout.java
index 1fad45a99e3..ca6fd44af50 100644
--- a/container-search/src/main/java/com/yahoo/search/query/ranking/SoftTimeout.java
+++ b/container-search/src/main/java/com/yahoo/search/query/ranking/SoftTimeout.java
@@ -8,7 +8,7 @@ import com.yahoo.search.query.profile.types.QueryProfileType;
import java.util.Objects;
/**
- * Holds the settings for the soft-timeout feature.
+ * Settings for the soft-timeout feature.
*
* @author baldersheim
*/
@@ -41,22 +41,24 @@ public class SoftTimeout implements Cloneable {
public void setFactor(double factor) {
if ((factor < 0.0) || (factor > 1.0)) {
- throw new IllegalArgumentException("factor must be in the range [0.0, 1.0]. It is " + factor);
+ throw new IllegalArgumentException("factor must be in the range [0.0, 1.0], got " + factor);
}
this.factor = factor;
}
+
public Double getFactor() { return factor; }
+
public void setTailcost(double tailcost) {
if ((tailcost < 0.0) || (tailcost > 1.0)) {
- throw new IllegalArgumentException("tailcost must be in the range [0.0, 1.0]. It is " + tailcost);
+ throw new IllegalArgumentException("tailcost must be in the range [0.0, 1.0], got " + tailcost);
}
this.tailcost = tailcost;
}
+
public Double getTailcost() { return tailcost; }
/** Internal operation - DO NOT USE */
public void prepare(RankProperties rankProperties) {
-
if (enable != null) {
rankProperties.put("vespa.softtimeout.enable", String.valueOf(enable));
}