aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/Ranking.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-04-26 16:26:36 +0200
committerJon Bratseth <bratseth@oath.com>2018-04-26 16:26:36 +0200
commit060f6026eb5e38a282b0e0a2214b64c9f13b9c76 (patch)
treed181246bbd75d164470e580fe0c883bb3bfdc987 /container-search/src/main/java/com/yahoo/search/query/Ranking.java
parent5f35f84715de58bfcfe0c5332f60e76ca96c6f7d (diff)
Wire missing query API properties into types
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.java7
1 files changed, 6 insertions, 1 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 44c26f55040..903eedfe870 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
@@ -6,7 +6,9 @@ import com.yahoo.prelude.Freshness;
import com.yahoo.prelude.Location;
import com.yahoo.search.Query;
import com.yahoo.search.query.profile.types.FieldDescription;
+import com.yahoo.search.query.profile.types.QueryProfileFieldType;
import com.yahoo.search.query.profile.types.QueryProfileType;
+import com.yahoo.search.query.ranking.Diversity;
import com.yahoo.search.query.ranking.MatchPhase;
import com.yahoo.search.query.ranking.Matching;
import com.yahoo.search.query.ranking.RankFeatures;
@@ -54,7 +56,10 @@ public class Ranking implements Cloneable {
argumentType.addField(new FieldDescription(LIST_FEATURES, "string", RANKFEATURES.toString()));
argumentType.addField(new FieldDescription(FRESHNESS, "string", "datetime"));
argumentType.addField(new FieldDescription(QUERYCACHE, "string"));
- argumentType.addField(new FieldDescription(MATCH_PHASE, "query-profile", "matchPhase"));
+ argumentType.addField(new FieldDescription(MATCH_PHASE, new QueryProfileFieldType(MatchPhase.getArgumentType()), "matchPhase"));
+ argumentType.addField(new FieldDescription(DIVERSITY, new QueryProfileFieldType(Diversity.getArgumentType())));
+ argumentType.addField(new FieldDescription(SOFTTIMEOUT, new QueryProfileFieldType(SoftTimeout.getArgumentType())));
+ argumentType.addField(new FieldDescription(MATCHING, new QueryProfileFieldType(Matching.getArgumentType())));
argumentType.addField(new FieldDescription(FEATURES, "query-profile", "rankfeature"));
argumentType.addField(new FieldDescription(PROPERTIES, "query-profile", "rankproperty"));
argumentType.freeze();