aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-12-19 12:01:52 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2023-12-19 12:01:52 +0100
commitaa0dc89f655654435d84d075f268754378b377aa (patch)
tree8b09ba3c7bef10adb0d3d8bf2b0096de61a38733 /config-model/src
parent9c9962463492d26623dfbd8aa838018ac53a8aa7 (diff)
Wire in sort-blueprints-by-estimate feature flag
Diffstat (limited to 'config-model/src')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java b/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java
index dad39e74c37..48a0eb6ded9 100644
--- a/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java
+++ b/config-model/src/main/java/com/yahoo/schema/derived/RawRankProfile.java
@@ -170,6 +170,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
private final OptionalDouble approximateThreshold;
private final OptionalDouble targetHitsMaxAdjustmentFactor;
private final double rankScoreDropLimit;
+ private final boolean sortBlueprintsByEstimate;
private final boolean alwaysMarkPhraseExpensive;
private final boolean createPostinglistWhenNonStrict;
private final boolean useEstimateForFetchPostings;
@@ -215,6 +216,7 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
minHitsPerThread = compiled.getMinHitsPerThread();
numSearchPartitions = compiled.getNumSearchPartitions();
termwiseLimit = compiled.getTermwiseLimit().orElse(deployProperties.featureFlags().defaultTermwiseLimit());
+ sortBlueprintsByEstimate = deployProperties.featureFlags().sortBlueprintsByEstimate();
alwaysMarkPhraseExpensive = deployProperties.featureFlags().alwaysMarkPhraseExpensive();
createPostinglistWhenNonStrict = deployProperties.featureFlags().createPostinglistWhenNonStrict();
useEstimateForFetchPostings = deployProperties.featureFlags().useEstimateForFetchPostings();
@@ -469,6 +471,9 @@ public class RawRankProfile implements RankProfilesConfig.Producer {
if (termwiseLimit < 1.0) {
properties.add(new Pair<>("vespa.matching.termwise_limit", termwiseLimit + ""));
}
+ if (sortBlueprintsByEstimate) {
+ properties.add(new Pair<>("vespa.matching.sort_blueprints_by_estimate", String.valueOf(sortBlueprintsByEstimate)));
+ }
if (alwaysMarkPhraseExpensive) {
properties.add(new Pair<>("vespa.matching.always_mark_phrase_expensive", String.valueOf(alwaysMarkPhraseExpensive)));
}