diff options
5 files changed, 8 insertions, 54 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java index 008a661a316..4ee7b00b79f 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java @@ -72,7 +72,7 @@ public interface ModelContext { * - Remove all flag data files from hosted-feature-flag repository */ interface FeatureFlags { - @ModelFeatureFlag(owners = {"baldersheim"}, comment = "Revisit in May or June 2023") default double defaultTermwiseLimit() { throw new UnsupportedOperationException("TODO specify default value"); } + @ModelFeatureFlag(owners = {"baldersheim"}, comment = "Revisit in May or June 2024") default double defaultTermwiseLimit() { throw new UnsupportedOperationException("TODO specify default value"); } @ModelFeatureFlag(owners = {"baldersheim"}, comment = "Select sequencer type use while feeding") default String feedSequencerType() { return "THROUGHPUT"; } @ModelFeatureFlag(owners = {"baldersheim"}) default String responseSequencerType() { throw new UnsupportedOperationException("TODO specify default value"); } @ModelFeatureFlag(owners = {"baldersheim"}) default String queryDispatchPolicy() { return "adaptive"; } @@ -116,9 +116,9 @@ public interface ModelContext { @ModelFeatureFlag(owners = {"vekterli"}) default long mergingMaxMemoryUsagePerNode() { return -1; } @ModelFeatureFlag(owners = {"vekterli"}) default boolean usePerDocumentThrottledDeleteBucket() { return false; } @ModelFeatureFlag(owners = {"baldersheim"}) default boolean alwaysMarkPhraseExpensive() { return false; } - @ModelFeatureFlag(owners = {"baldersheim"}) default boolean createPostinglistWhenNonStrict() { return true; } - @ModelFeatureFlag(owners = {"baldersheim"}) default boolean useEstimateForFetchPostings() { return false; } - @ModelFeatureFlag(owners = {"baldersheim"}) default boolean useThreadBundleForFetchPostings() { return false; } + @ModelFeatureFlag(owners = {"baldersheim"}, removeAfter = "8.278") default boolean createPostinglistWhenNonStrict() { return true; } + @ModelFeatureFlag(owners = {"baldersheim"}, removeAfter = "8.278") default boolean useEstimateForFetchPostings() { return true; } + @ModelFeatureFlag(owners = {"baldersheim"}, removeAfter = "8.278") default boolean useThreadBundleForFetchPostings() { return true; } @ModelFeatureFlag(owners = {"hmusum"}) default boolean restartOnDeployWhenOnnxModelChanges() { return false; } @ModelFeatureFlag(owners = {"baldersheim"}) default boolean sortBlueprintsByCost() { return false; } } 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 a99fa8b7710..33a363312d6 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 @@ -172,9 +172,6 @@ public class RawRankProfile implements RankProfilesConfig.Producer { private final double rankScoreDropLimit; private final boolean sortBlueprintsByCost; private final boolean alwaysMarkPhraseExpensive; - private final boolean createPostinglistWhenNonStrict; - private final boolean useEstimateForFetchPostings; - private final boolean useThreadBundleForFetchPostings; /** * The rank type definitions used to derive settings for the native rank features @@ -218,9 +215,6 @@ public class RawRankProfile implements RankProfilesConfig.Producer { termwiseLimit = compiled.getTermwiseLimit().orElse(deployProperties.featureFlags().defaultTermwiseLimit()); sortBlueprintsByCost = deployProperties.featureFlags().sortBlueprintsByCost(); alwaysMarkPhraseExpensive = deployProperties.featureFlags().alwaysMarkPhraseExpensive(); - createPostinglistWhenNonStrict = deployProperties.featureFlags().createPostinglistWhenNonStrict(); - useEstimateForFetchPostings = deployProperties.featureFlags().useEstimateForFetchPostings(); - useThreadBundleForFetchPostings = deployProperties.featureFlags().useThreadBundleForFetchPostings(); postFilterThreshold = compiled.getPostFilterThreshold(); approximateThreshold = compiled.getApproximateThreshold(); targetHitsMaxAdjustmentFactor = compiled.getTargetHitsMaxAdjustmentFactor(); @@ -477,15 +471,6 @@ public class RawRankProfile implements RankProfilesConfig.Producer { if (alwaysMarkPhraseExpensive) { properties.add(new Pair<>("vespa.matching.always_mark_phrase_expensive", String.valueOf(alwaysMarkPhraseExpensive))); } - if ( ! createPostinglistWhenNonStrict) { - properties.add(new Pair<>("vespa.matching.create_postinglist_when_non_strict", String.valueOf(createPostinglistWhenNonStrict))); - } - if (useEstimateForFetchPostings) { - properties.add(new Pair<>("vespa.matching.use_estimate_for_fetch_postings", String.valueOf(useEstimateForFetchPostings))); - } - if (useThreadBundleForFetchPostings) { - properties.add(new Pair<>("vespa.matching.use_thread_bundle_for_fetch_postings", String.valueOf(useThreadBundleForFetchPostings))); - } if (postFilterThreshold.isPresent()) { properties.add(new Pair<>("vespa.matching.global_filter.upper_limit", String.valueOf(postFilterThreshold.getAsDouble()))); } diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java index 0c387e38afb..5dd04c102c4 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java @@ -203,9 +203,6 @@ public class ModelContextImpl implements ModelContext { private final String summaryDecodePolicy; private boolean sortBlueprintsByCost; private final boolean alwaysMarkPhraseExpensive; - private final boolean createPostinglistWhenNonStrict; - private final boolean useEstimateForFetchPostings; - private final boolean useThreadBundleForFetchPostings; private final int contentLayerMetadataFeatureLevel; private final boolean dynamicHeapSize; private final String unknownConfigDefinition; @@ -257,9 +254,6 @@ public class ModelContextImpl implements ModelContext { this.mergingMaxMemoryUsagePerNode = flagValue(source, appId, version, Flags.MERGING_MAX_MEMORY_USAGE_PER_NODE); this.usePerDocumentThrottledDeleteBucket = flagValue(source, appId, version, Flags.USE_PER_DOCUMENT_THROTTLED_DELETE_BUCKET); this.alwaysMarkPhraseExpensive = flagValue(source, appId, version, Flags.ALWAYS_MARK_PHRASE_EXPENSIVE); - this.createPostinglistWhenNonStrict = flagValue(source, appId, version, Flags.CREATE_POSTINGLIST_WHEN_NON_STRICT); - this.useEstimateForFetchPostings = flagValue(source, appId, version, Flags.USE_ESTIMATE_FOR_FETCH_POSTINGS); - this.useThreadBundleForFetchPostings = flagValue(source, appId, version, Flags.USE_THREAD_BUNDLE_FOR_FETCH_POSTINGS); this.restartOnDeployWhenOnnxModelChanges = flagValue(source, appId, version, Flags.RESTART_ON_DEPLOY_WHEN_ONNX_MODEL_CHANGES); this.sortBlueprintsByCost = flagValue(source, appId, version, Flags.SORT_BLUEPRINTS_BY_COST); } @@ -308,9 +302,6 @@ public class ModelContextImpl implements ModelContext { return defVal; } @Override public boolean alwaysMarkPhraseExpensive() { return alwaysMarkPhraseExpensive; } - @Override public boolean createPostinglistWhenNonStrict() { return createPostinglistWhenNonStrict; } - @Override public boolean useEstimateForFetchPostings() { return useEstimateForFetchPostings; } - @Override public boolean useThreadBundleForFetchPostings() { return useThreadBundleForFetchPostings; } @Override public int contentLayerMetadataFeatureLevel() { return contentLayerMetadataFeatureLevel; } @Override public boolean dynamicHeapSize() { return dynamicHeapSize; } @Override public String unknownConfigDefinition() { return unknownConfigDefinition; } diff --git a/container-search/src/main/java/com/yahoo/prelude/querytransform/NormalizingSearcher.java b/container-search/src/main/java/com/yahoo/prelude/querytransform/NormalizingSearcher.java index 7a97766e025..30480ce1098 100644 --- a/container-search/src/main/java/com/yahoo/prelude/querytransform/NormalizingSearcher.java +++ b/container-search/src/main/java/com/yahoo/prelude/querytransform/NormalizingSearcher.java @@ -120,7 +120,7 @@ public class NormalizingSearcher extends Searcher { List<Alternative> terms = block.getAlternatives(); for (Alternative term : terms) { String accentDropped = linguistics.getTransformer().accentDrop(term.word, language); - if ( ! term.word.equals(accentDropped) && accentDropped.length() > 0) + if ( ! term.word.equals(accentDropped) && !accentDropped.isEmpty()) block.addTerm(accentDropped, term.exactness * .7d); } } @@ -144,15 +144,14 @@ public class NormalizingSearcher extends Searcher { } private void normalizeWord(Language language, IndexFacts.Session indexFacts, TermItem term, ListIterator<Item> i) { - if ( ! (term instanceof WordItem)) return; + if ( ! (term instanceof WordItem word)) return; if ( ! term.isNormalizable()) return; Index index = indexFacts.getIndex(term.getIndexName()); if (index.isAttribute()) return; if ( ! index.getNormalize()) return; - WordItem word = (WordItem) term; String accentDropped = linguistics.getTransformer().accentDrop(word.getWord(), language); - if (accentDropped.length() == 0) + if (accentDropped.isEmpty()) i.remove(); else word.setWord(accentDropped); diff --git a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java index a32ed75d67b..79b3fb00d71 100644 --- a/flags/src/main/java/com/yahoo/vespa/flags/Flags.java +++ b/flags/src/main/java/com/yahoo/vespa/flags/Flags.java @@ -334,32 +334,11 @@ public class Flags { public static final UnboundBooleanFlag ALWAYS_MARK_PHRASE_EXPENSIVE = defineFeatureFlag( "always-mark-phrase-expensive", false, - List.of("baldersheim"), "2023-11-20", "2023-12-31", + List.of("baldersheim"), "2023-11-20", "2024-02-29", "If true all phrases will be marked expensive, independent of parents", "Takes effect at redeployment", INSTANCE_ID); - public static final UnboundBooleanFlag CREATE_POSTINGLIST_WHEN_NON_STRICT = defineFeatureFlag( - "create-postinglist-when-non-strict", true, - List.of("baldersheim"), "2023-12-04", "2024-01-31", - "If true posting list can be created on the fly also for non-strict iterators", - "Takes effect at redeployment", - INSTANCE_ID); - - public static final UnboundBooleanFlag USE_ESTIMATE_FOR_FETCH_POSTINGS = defineFeatureFlag( - "use-estimate-for-fetch-postings", true, - List.of("baldersheim"), "2023-12-06", "2024-01-31", - "If true an estimate assuming uncorrelated query terms is used in Blueprint::fetchPostings", - "Takes effect at redeployment", - INSTANCE_ID); - - public static final UnboundBooleanFlag USE_THREAD_BUNDLE_FOR_FETCH_POSTINGS = defineFeatureFlag( - "use-thread-bundle-for-fetch-postings", true, - List.of("baldersheim"), "2023-12-06", "2024-01-31", - "If true the query thread bundle is used for Blueprint::fetchPostings", - "Takes effect at redeployment", - INSTANCE_ID); - public static final UnboundBooleanFlag WRITE_CONFIG_SERVER_SESSION_DATA_AS_ONE_BLOB = defineFeatureFlag( "write-config-server-session-data-as-blob", false, List.of("hmusum"), "2023-07-19", "2024-02-01", |