diff options
5 files changed, 22 insertions, 30 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 b9ada59cb0b..0700d7280f7 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 @@ -55,16 +55,23 @@ public interface ModelContext { Set<ContainerEndpoint> endpoints(); boolean isBootstrap(); boolean isFirstTimeDeployment(); - // TODO: Remove when Vespa 7.112 is the oldest config model in use + + // TODO: Remove after April 2020 default boolean useDedicatedNodeForLogserver() { return true; } + boolean useAdaptiveDispatch(); - // TODO: Remove temporary default implementations + + // TODO: Remove after April 2020 default Optional<TlsSecrets> tlsSecrets() { return Optional.empty(); } + default Optional<EndpointCertificateSecrets> endpointCertificateSecrets() { return Optional.empty(); } double defaultTermwiseLimit(); boolean useBucketSpaceMetric(); default boolean useNewAthenzFilter() { return false; } + + // TODO: Remove after April 2020 default boolean usePhraseSegmenting() { return false; } + default String proxyProtocol() { return "https-only"; } default Optional<AthenzDomain> athenzDomain() { return Optional.empty(); } default boolean useDedicatedNodesWhenUnspecified() { return false; } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java index b16f8c0e5bb..fc8710fa1a1 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/DerivedConfiguration.java @@ -87,7 +87,7 @@ public class DerivedConfiguration { juniperrc = new Juniperrc(search); rankProfileList = new RankProfileList(search, search.rankingConstants(), attributeFields, rankProfileRegistry, queryProfiles, importedModels, deployProperties); indexingScript = new IndexingScript(search); - indexInfo = new IndexInfo(search, deployProperties); + indexInfo = new IndexInfo(search); indexSchema = new IndexSchema(search); importedFields = new ImportedFields(search); } diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java index 9ae72badf1c..a631aa19968 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java @@ -1,11 +1,18 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.searchdefinition.derived; -import com.yahoo.config.model.api.ModelContext; -import com.yahoo.document.*; +import com.yahoo.document.CollectionDataType; +import com.yahoo.document.DataType; +import com.yahoo.document.NumericDataType; +import com.yahoo.document.PositionDataType; import com.yahoo.searchdefinition.Index; import com.yahoo.searchdefinition.Search; -import com.yahoo.searchdefinition.document.*; +import com.yahoo.searchdefinition.document.Attribute; +import com.yahoo.searchdefinition.document.BooleanIndexDefinition; +import com.yahoo.searchdefinition.document.FieldSet; +import com.yahoo.searchdefinition.document.ImmutableSDField; +import com.yahoo.searchdefinition.document.Matching; +import com.yahoo.searchdefinition.document.Stemming; import com.yahoo.searchdefinition.processing.ExactMatch; import com.yahoo.searchdefinition.processing.NGramMatch; import com.yahoo.vespa.documentmodel.SummaryField; @@ -43,11 +50,9 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { private Map<String, String> aliases = new java.util.LinkedHashMap<>(); private Map<String, FieldSet> fieldSets; private Search search; - private final boolean phraseSegmenting; - public IndexInfo(Search search, ModelContext.Properties deployProperties) { + public IndexInfo(Search search) { this.fieldSets = search.fieldSets().userFieldSets(); - this.phraseSegmenting = deployProperties.usePhraseSegmenting(); addIndexCommand("sddocname", CMD_INDEX); addIndexCommand("sddocname", CMD_WORD); derive(search); @@ -158,10 +163,6 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { addIndexCommand(field, CMD_NUMERICAL); } - if (phraseSegmenting) { - addIndexCommand(field, CMD_PHRASE_SEGMENTING); - } - // Explicit commands for (String command : field.getQueryCommands()) { addIndexCommand(field, command); @@ -413,14 +414,6 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { } } - - if (phraseSegmentingCommand == null - && fieldSet.queryCommands().stream().noneMatch(c -> c.startsWith(CMD_PHRASE_SEGMENTING))) { // use default - if (phraseSegmenting) - iiB.command(new IndexInfoConfig.Indexinfo.Command.Builder() - .indexname(fieldSet.getName()) - .command(CMD_PHRASE_SEGMENTING)); - } } private boolean hasMultiValueField(FieldSet fieldSet) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java index 61d0cd7cd1e..e3357976a2b 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java @@ -90,9 +90,7 @@ public class DomAdminV4Builder extends DomAdminBuilderBase { private NodesSpecification createNodesSpecificationForLogserver() { DeployState deployState = context.getDeployState(); - if (deployState.getProperties().useDedicatedNodeForLogserver() && - context.getApplicationType() == ConfigModelContext.ApplicationType.DEFAULT && - deployState.isHosted()) + if (context.getApplicationType() == ConfigModelContext.ApplicationType.DEFAULT && deployState.isHosted()) return NodesSpecification.dedicated(1, context); else return NodesSpecification.nonDedicated(1, context); 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 a292ea65d9d..7bfbf5f4e06 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 @@ -143,7 +143,6 @@ public class ModelContextImpl implements ModelContext { private final double defaultTermwiseLimit; private final boolean useBucketSpaceMetric; private final boolean useNewAthenzFilter; - private final boolean usePhraseSegmenting; private final String proxyProtocol; private final Optional<AthenzDomain> athenzDomain; private final boolean useDedicatedNodesWhenUnspecified; @@ -182,8 +181,6 @@ public class ModelContextImpl implements ModelContext { .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); this.useNewAthenzFilter = Flags.USE_NEW_ATHENZ_FILTER.bindTo(flagSource) .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); - this.usePhraseSegmenting = Flags.PHRASE_SEGMENTING.bindTo(flagSource) - .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); this.proxyProtocol = Flags.PROXY_PROTOCOL.bindTo(flagSource) .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); this.athenzDomain = athenzDomain; @@ -247,9 +244,6 @@ public class ModelContextImpl implements ModelContext { public boolean useNewAthenzFilter() { return useNewAthenzFilter; } @Override - public boolean usePhraseSegmenting() { return usePhraseSegmenting; } - - @Override public String proxyProtocol() { return proxyProtocol; } @Override |