diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2020-03-23 11:56:45 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2020-03-23 11:56:45 +0100 |
commit | 0d1baa5e33382bc9703be676572283ac92dafcea (patch) | |
tree | 69e06c32e2b09df0e8d1641cfe41cd735b60426e /config-model | |
parent | 59f0e0e4c0e2dd8765da655f32cb918952b98a37 (diff) |
Remove phrase-segmentation flag
Diffstat (limited to 'config-model')
3 files changed, 13 insertions, 22 deletions
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); |