summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/Ranking.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-02-01 00:49:28 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-02-01 00:49:28 +0100
commit1bda2e5d4913415ca9e4dcec49a70352f7bf9373 (patch)
tree6c5ffaf4b22a77d5dbaa16f0a0c5dbabbf0f3593 /container-search/src/main/java/com/yahoo/search/query/Ranking.java
parent09891fa60e5da3d2713020018ca242c67cde9f9e (diff)
Add querytime control overer ranking.matching.xxxx
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/Ranking.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/Ranking.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/Ranking.java b/container-search/src/main/java/com/yahoo/search/query/Ranking.java
index addd759cd29..17ec32b200a 100644
--- a/container-search/src/main/java/com/yahoo/search/query/Ranking.java
+++ b/container-search/src/main/java/com/yahoo/search/query/Ranking.java
@@ -8,8 +8,10 @@ import com.yahoo.search.Query;
import com.yahoo.search.query.profile.types.FieldDescription;
import com.yahoo.search.query.profile.types.QueryProfileType;
import com.yahoo.search.query.ranking.MatchPhase;
+import com.yahoo.search.query.ranking.Matching;
import com.yahoo.search.query.ranking.RankFeatures;
import com.yahoo.search.query.ranking.RankProperties;
+import com.yahoo.search.query.ranking.SoftTimeout;
import com.yahoo.search.result.ErrorMessage;
/**
@@ -38,6 +40,7 @@ public class Ranking implements Cloneable {
public static final String MATCH_PHASE = "matchPhase";
public static final String DIVERSITY = "diversity";
public static final String SOFTTIMEOUT = "softtimeout";
+ public static final String MATCHING = "matching";
public static final String FEATURES = "features";
public static final String PROPERTIES = "properties";
@@ -83,6 +86,8 @@ public class Ranking implements Cloneable {
private MatchPhase matchPhase = new MatchPhase();
+ private Matching matching = new Matching();
+
private SoftTimeout softTimeout = new SoftTimeout();
public Ranking(Query parent) {
@@ -172,6 +177,9 @@ public class Ranking implements Cloneable {
/** Returns the match phase rank settings of this. This is never null. */
public MatchPhase getMatchPhase() { return matchPhase; }
+ /** Returns the matching settings of this. This is never null. */
+ public Matching getMatching() { return matching; }
+
/** Returns the soft timeout settings of this. This is never null. */
public SoftTimeout getSoftTimeout() { return softTimeout; }
@@ -185,6 +193,7 @@ public class Ranking implements Cloneable {
clone.rankProperties = this.rankProperties.clone();
clone.rankFeatures = this.rankFeatures.clone();
clone.matchPhase = this.matchPhase.clone();
+ clone.matching = this.matching.clone();
clone.softTimeout = this.softTimeout.clone();
return clone;
}
@@ -216,6 +225,7 @@ public class Ranking implements Cloneable {
hash += 13 * rankProperties.hashCode();
hash += 17 * matchPhase.hashCode();
hash += 19 * softTimeout.hashCode();
+ hash += 23 * matching.hashCode();
return Ranking.class.hashCode() + QueryHelper.combineHash(sorting,location,profile,hash);
}
@@ -240,6 +250,7 @@ public class Ranking implements Cloneable {
public void prepare() {
rankFeatures.prepare(rankProperties);
matchPhase.prepare(rankProperties);
+ matching.prepare(rankProperties);
softTimeout.prepare(rankProperties);
prepareNow(freshness);
}