summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-09-24 17:01:43 -0700
committerJon Bratseth <bratseth@oath.com>2018-09-24 17:01:43 -0700
commit015abd305551de1201586398bedcef98a65732ae (patch)
tree96784a072480e27cc85b8f9fa5783d622bff4fdc /config-model
parent6162ec099bc06ac7ba7a82f2ca59aa1e869a6c96 (diff)
parent843eff1591eebee0f59eb9ef36e44989952c319b (diff)
Merge with master
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java17
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/test/TestDriver.java3
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/DocumentOnlySearch.java (renamed from config-model/src/main/java/com/yahoo/searchdefinition/UnproperSearch.java)13
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/UnprocessingSearchBuilder.java44
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java33
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java1
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminV4Builder.java11
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/ContainerModelEvaluation.java15
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java4
-rw-r--r--config-model/src/main/javacc/SDParser.jj4
-rw-r--r--config-model/src/test/derived/documentderiver/compression_body.sd20
-rw-r--r--config-model/src/test/derived/documentderiver/compression_both.sd26
-rw-r--r--config-model/src/test/derived/documentderiver/compression_header.sd20
-rw-r--r--config-model/src/test/derived/documentderiver/documentmanager.cfg394
-rw-r--r--config-model/src/test/derived/documentderiver/mail.sd112
-rw-r--r--config-model/src/test/derived/documentderiver/music.sd44
-rw-r--r--config-model/src/test/derived/documentderiver/newsarticle.sd126
-rw-r--r--config-model/src/test/derived/documentderiver/newssummary.sd165
-rw-r--r--config-model/src/test/derived/documentderiver/sombrero.sd36
-rw-r--r--config-model/src/test/derived/documentderiver/vsmfields.cfg390
-rw-r--r--config-model/src/test/derived/documentderiver/vsmsummary.cfg4
-rw-r--r--config-model/src/test/derived/inheritancebadtypes/child.sd8
-rw-r--r--config-model/src/test/derived/inheritancebadtypes/parent.sd8
-rw-r--r--config-model/src/test/examples/attributeindex.sd24
-rw-r--r--config-model/src/test/examples/attributeproperties1.sd21
-rw-r--r--config-model/src/test/examples/attributeproperties2.sd27
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java4
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/MockModelContext.java3
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/application/provider/SchemaValidatorTest.java3
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java11
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java3
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java22
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/DocumentDeriverTestCase.java114
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java14
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/MailTestCase.java32
-rwxr-xr-xconfig-model/src/test/java/com/yahoo/searchdefinition/derived/StreamingStructTestCase.java11
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributeIndexTestCase.java34
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributePropertiesTestCase.java40
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/BoldingTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java5
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java16
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/VespaModelFactoryTest.java3
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTester.java7
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithFilePkg.java3
46 files changed, 98 insertions, 1805 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java
index 53c70399e94..9d9a19bfbd6 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployProperties.java
@@ -27,6 +27,8 @@ public class DeployProperties {
private final Version vespaVersion;
private final boolean isBootstrap;
private final boolean isFirstTimeDeployment;
+ private final boolean useDedicatedNodeForLogserver;
+
private DeployProperties(boolean multitenant,
ApplicationId applicationId,
@@ -37,7 +39,8 @@ public class DeployProperties {
String athenzDnsSuffix,
Version vespaVersion,
boolean isBootstrap,
- boolean isFirstTimeDeployment) {
+ boolean isFirstTimeDeployment,
+ boolean useDedicatedNodeForLogserver) {
this.loadBalancerName = loadBalancerName;
this.ztsUrl = ztsUrl;
this.athenzDnsSuffix = athenzDnsSuffix;
@@ -48,6 +51,7 @@ public class DeployProperties {
this.hostedVespa = hostedVespa;
this.isBootstrap = isBootstrap;
this.isFirstTimeDeployment = isFirstTimeDeployment;
+ this.useDedicatedNodeForLogserver = useDedicatedNodeForLogserver;
}
public boolean multitenant() {
@@ -89,6 +93,8 @@ public class DeployProperties {
/** Returns whether this is the first deployment for this application (used during *prepare*, not set on activate) */
public boolean isFirstTimeDeployment() { return isFirstTimeDeployment; }
+ public boolean useDedicatedNodeForLogserver() { return useDedicatedNodeForLogserver; }
+
public static class Builder {
private ApplicationId applicationId = ApplicationId.defaultId();
@@ -101,6 +107,7 @@ public class DeployProperties {
private Version vespaVersion = Version.fromIntValues(1, 0, 0);
private boolean isBootstrap = false;
private boolean isFirstTimeDeployment = false;
+ private boolean useDedicatedNodeForLogserver = false;
public Builder applicationId(ApplicationId applicationId) {
this.applicationId = applicationId;
@@ -152,9 +159,15 @@ public class DeployProperties {
return this;
}
+ public Builder useDedicatedNodeForLogserver(boolean useDedicatedNodeForLogserver) {
+ this.useDedicatedNodeForLogserver = useDedicatedNodeForLogserver;
+ return this;
+ }
+
public DeployProperties build() {
return new DeployProperties(multitenant, applicationId, configServerSpecs, loadBalancerName, hostedVespa,
- ztsUrl, athenzDnsSuffix, vespaVersion, isBootstrap, isFirstTimeDeployment);
+ ztsUrl, athenzDnsSuffix, vespaVersion, isBootstrap, isFirstTimeDeployment,
+ useDedicatedNodeForLogserver);
}
}
diff --git a/config-model/src/main/java/com/yahoo/config/model/test/TestDriver.java b/config-model/src/main/java/com/yahoo/config/model/test/TestDriver.java
index b538468d0bc..e0047aba2db 100644
--- a/config-model/src/main/java/com/yahoo/config/model/test/TestDriver.java
+++ b/config-model/src/main/java/com/yahoo/config/model/test/TestDriver.java
@@ -9,6 +9,7 @@ import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.config.model.application.provider.SchemaValidators;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.builder.xml.ConfigModelBuilder;
+import com.yahoo.vespa.config.VespaVersion;
import com.yahoo.vespa.model.VespaModel;
import org.xml.sax.SAXException;
@@ -103,7 +104,7 @@ public class TestDriver {
if (!validate) {
return;
}
- SchemaValidators schemaValidators = new SchemaValidators(new Version(6), new BaseDeployLogger());
+ SchemaValidators schemaValidators = new SchemaValidators(new Version(VespaVersion.major));
if (appPkg.getHosts() != null) {
schemaValidators.hostsXmlValidator().validate(appPkg.getHosts());
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/UnproperSearch.java b/config-model/src/main/java/com/yahoo/searchdefinition/DocumentOnlySearch.java
index 71d3db6616b..5940f908be8 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/UnproperSearch.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/DocumentOnlySearch.java
@@ -5,19 +5,13 @@ import com.yahoo.searchdefinition.document.SDDocumentType;
/**
* A search that was derived from an sd file containing no search element(s), only
- * document specifications.
+ * document specifications, so the name of this is decided by parsing and adding the document instance.
*
* @author vegardh
- *
*/
- // Award for best class name goes to ...
-public class UnproperSearch extends Search {
- // This class exists because the parser accepts SD files without search { ... , and
- // there are unit tests using it too, BUT there are many nullpointer bugs if you try to
- // deploy such a file. Using this class to try to catch those.
- // TODO: Throw away this when we properly support doc-only SD files.
+public class DocumentOnlySearch extends Search {
- public UnproperSearch() {
+ public DocumentOnlySearch() {
// empty
}
@@ -28,4 +22,5 @@ public class UnproperSearch extends Search {
}
super.addDocument(docType);
}
+
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/UnprocessingSearchBuilder.java b/config-model/src/main/java/com/yahoo/searchdefinition/UnprocessingSearchBuilder.java
deleted file mode 100644
index 6c12c6c94d1..00000000000
--- a/config-model/src/main/java/com/yahoo/searchdefinition/UnprocessingSearchBuilder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.searchdefinition;
-
-import com.yahoo.search.query.profile.QueryProfileRegistry;
-import com.yahoo.searchdefinition.parser.ParseException;
-import com.yahoo.config.application.api.ApplicationPackage;
-import com.yahoo.config.application.api.DeployLogger;
-import com.yahoo.vespa.model.container.search.QueryProfiles;
-
-import java.io.IOException;
-
-/**
- * A SearchBuilder that does not run the processing chain for searches
- */
-public class UnprocessingSearchBuilder extends SearchBuilder {
-
- public UnprocessingSearchBuilder(ApplicationPackage app,
- RankProfileRegistry rankProfileRegistry,
- QueryProfileRegistry queryProfileRegistry) {
- super(app, rankProfileRegistry, queryProfileRegistry);
- }
-
- public UnprocessingSearchBuilder() {
- super();
- }
-
- public UnprocessingSearchBuilder(RankProfileRegistry rankProfileRegistry,
- QueryProfileRegistry queryProfileRegistry) {
- super(rankProfileRegistry, queryProfileRegistry);
- }
-
- @Override
- public void process(Search search, DeployLogger deployLogger, QueryProfiles queryProfiles, boolean validate) {
- // empty
- }
-
- public static Search buildUnprocessedFromFile(String fileName) throws IOException, ParseException {
- SearchBuilder builder = new UnprocessingSearchBuilder();
- builder.importFile(fileName);
- builder.build();
- return builder.getSearch();
- }
-
-}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java
index e6b6c58cb38..133adb45dd9 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/Deriver.java
@@ -3,7 +3,6 @@ package com.yahoo.searchdefinition.derived;
import com.yahoo.document.DocumenttypesConfig;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.UnprocessingSearchBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.configmodel.producers.DocumentManager;
import com.yahoo.vespa.configmodel.producers.DocumentTypes;
@@ -18,25 +17,6 @@ import java.util.List;
*/
public class Deriver {
- /**
- * Derives only document manager.
- *
- *
- * @param sdFileNames The name of the search definition files to derive from.
- * @param toDir The directory to write configuration to.
- * @return The list of Search objects, possibly "unproper ones", from sd files containing only document
- */
- public static SearchBuilder deriveDocuments(List<String> sdFileNames, String toDir) {
- SearchBuilder builder = getUnprocessingSearchBuilder(sdFileNames);
- DocumentmanagerConfig.Builder documentManagerCfg = new DocumentManager().produce(builder.getModel(), new DocumentmanagerConfig.Builder());
- try {
- DerivedConfiguration.exportDocuments(documentManagerCfg, toDir);
- } catch (IOException e) {
- throw new IllegalArgumentException(e);
- }
- return builder;
- }
-
public static SearchBuilder getSearchBuilder(List<String> sds) {
SearchBuilder builder = new SearchBuilder();
try {
@@ -50,19 +30,6 @@ public class Deriver {
return builder;
}
- public static SearchBuilder getUnprocessingSearchBuilder(List<String> sds) {
- SearchBuilder builder = new UnprocessingSearchBuilder();
- try {
- for (String s : sds) {
- builder.importFile(s);
- }
- } catch (ParseException | IOException e) {
- throw new IllegalArgumentException(e);
- }
- builder.build();
- return builder;
- }
-
public static DocumentmanagerConfig.Builder getDocumentManagerConfig(String sd) {
return getDocumentManagerConfig(Collections.singletonList(sd));
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java
index 75f70d03fcc..2af9b297e9e 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java
@@ -156,6 +156,7 @@ public class VespaModelFactory implements ModelFactory {
.vespaVersion(getVersion())
.isBootstrap(properties.isBootstrap())
.isFirstTimeDeployment(properties.isFirstTimeDeployment())
+ .useDedicatedNodeForLogserver(properties.useDedicatedNodeForLogserver())
.build();
}
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 ea943f069cb..5cf55be5534 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
@@ -3,6 +3,7 @@ package com.yahoo.vespa.model.builder.xml.dom;
import com.yahoo.config.model.ConfigModelContext;
import com.yahoo.config.model.api.ConfigServerSpec;
+import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.SystemName;
@@ -93,9 +94,13 @@ public class DomAdminV4Builder extends DomAdminBuilderBase {
private NodesSpecification createNodesSpecificationForLogserver() {
// TODO: Enable for main system as well
- //if (context.getDeployState().isHosted() && context.getDeployState().zone().system() == SystemName.cd)
- // return NodesSpecification.dedicated(1, context);
- //else
+ DeployState deployState = context.getDeployState();
+ if (deployState.getProperties().useDedicatedNodeForLogserver() &&
+ context.getApplicationType() == ConfigModelContext.ApplicationType.DEFAULT &&
+ deployState.isHosted() &&
+ deployState.zone().system() == SystemName.cd)
+ return NodesSpecification.dedicated(1, context);
+ else
return NodesSpecification.nonDedicated(1, context);
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerModelEvaluation.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerModelEvaluation.java
index 11736256d1b..812c38db2fd 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerModelEvaluation.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ContainerModelEvaluation.java
@@ -2,7 +2,6 @@
package com.yahoo.vespa.model.container;
import ai.vespa.models.evaluation.ModelsEvaluator;
-import ai.vespa.models.handler.ModelsEvaluationHandler;
import com.yahoo.osgi.provider.model.ComponentModel;
import com.yahoo.searchdefinition.derived.RankProfileList;
import com.yahoo.vespa.config.search.RankProfilesConfig;
@@ -19,9 +18,10 @@ import java.util.Objects;
*/
public class ContainerModelEvaluation implements RankProfilesConfig.Producer, RankingConstantsConfig.Producer {
- private final static String EVALUATOR_NAME = ModelsEvaluator.class.getName();
- private final static String REST_HANDLER_NAME = ModelsEvaluationHandler.class.getName();
private final static String BUNDLE_NAME = "model-evaluation";
+ private final static String EVALUATOR_NAME = ModelsEvaluator.class.getName();
+ private final static String REST_HANDLER_NAME = "ai.vespa.models.handler.ModelsEvaluationHandler";
+ private final static String REST_BINDING = "model-evaluation/v1";
/** Global rank profiles, aka models */
private final RankProfileList rankProfileList;
@@ -48,11 +48,10 @@ public class ContainerModelEvaluation implements RankProfilesConfig.Producer, Ra
public static Handler<?> getHandler() {
Handler<?> handler = new Handler<>(new ComponentModel(REST_HANDLER_NAME, null, BUNDLE_NAME));
- String binding = ModelsEvaluationHandler.API_ROOT + "/" + ModelsEvaluationHandler.VERSION_V1;
- handler.addServerBindings("http://*/" + binding,
- "https://*/" + binding,
- "http://*/" + binding + "/*",
- "https://*/" + binding + "/*");
+ handler.addServerBindings("http://*/" + REST_BINDING,
+ "https://*/" + REST_BINDING,
+ "http://*/" + REST_BINDING + "/*",
+ "https://*/" + REST_BINDING + "/*");
return handler;
}
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
index c7762f09851..c46a662b682 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java
@@ -9,7 +9,7 @@ import com.yahoo.vespa.config.search.RankProfilesConfig;
import com.yahoo.config.model.producer.AbstractConfigProducer;
import com.yahoo.prelude.fastsearch.DocumentdbInfoConfig;
import com.yahoo.search.config.IndexInfoConfig;
-import com.yahoo.searchdefinition.UnproperSearch;
+import com.yahoo.searchdefinition.DocumentOnlySearch;
import com.yahoo.searchdefinition.derived.DerivedConfiguration;
import com.yahoo.vespa.configdefinition.IlscriptsConfig;
import com.yahoo.vespa.model.HostResource;
@@ -286,7 +286,7 @@ public class IndexedSearchCluster extends SearchCluster
List<com.yahoo.searchdefinition.Search> globalSearches) {
for (SearchDefinitionSpec spec : localSearches) {
com.yahoo.searchdefinition.Search search = spec.getSearchDefinition().getSearch();
- if ( ! (search instanceof UnproperSearch)) {
+ if ( ! (search instanceof DocumentOnlySearch)) {
DocumentDatabase db = new DocumentDatabase(this,
search.getName(),
new DerivedConfiguration(search,
diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj
index 813d1d47533..c702651b005 100644
--- a/config-model/src/main/javacc/SDParser.jj
+++ b/config-model/src/main/javacc/SDParser.jj
@@ -40,7 +40,7 @@ import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.RankProfile.MatchPhaseSettings;
import com.yahoo.searchdefinition.RankProfile.DiversitySettings;
import com.yahoo.searchdefinition.Search;
-import com.yahoo.searchdefinition.UnproperSearch;
+import com.yahoo.searchdefinition.DocumentOnlySearch;
import com.yahoo.searchdefinition.UnrankedRankProfile;
import com.yahoo.searchdefinition.fieldoperation.*;
import com.yahoo.searchlib.rankingexpression.FeatureList;
@@ -457,7 +457,7 @@ Object rootSearchItem(Search search) : { }
*/
Search rootDocument(String dir) :
{
- Search search = new UnproperSearch();
+ Search search = new DocumentOnlySearch();
}
{
( (rootDocumentItem(search) (<NL>)*)*<EOF> )
diff --git a/config-model/src/test/derived/documentderiver/compression_body.sd b/config-model/src/test/derived/documentderiver/compression_body.sd
deleted file mode 100644
index cd114b24017..00000000000
--- a/config-model/src/test/derived/documentderiver/compression_body.sd
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search compressed_body {
-
- document compressed_body {
- body {
- compression {
- level:6
- }
- }
-
- field from type string {
- }
-
- field content type string {
- body
- }
- }
-
-}
-
diff --git a/config-model/src/test/derived/documentderiver/compression_both.sd b/config-model/src/test/derived/documentderiver/compression_both.sd
deleted file mode 100644
index 577aef702d3..00000000000
--- a/config-model/src/test/derived/documentderiver/compression_both.sd
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search compressed_both {
-
- document compressed_both {
- compression {
- threshold:90
- level:9
- }
-
- header {
- compression {
- threshold:50
- level:6
- }
- }
-
- field from type string {
- }
-
- field content type string {
- body
- }
- }
-
-}
-
diff --git a/config-model/src/test/derived/documentderiver/compression_header.sd b/config-model/src/test/derived/documentderiver/compression_header.sd
deleted file mode 100644
index 6ff951b34cb..00000000000
--- a/config-model/src/test/derived/documentderiver/compression_header.sd
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search compressed_header {
-
- document compressed_header {
- header {
- compression {
- level:9
- }
- }
-
- field from type string {
- }
-
- field content type string {
- body
- }
- }
-
-}
-
diff --git a/config-model/src/test/derived/documentderiver/documentmanager.cfg b/config-model/src/test/derived/documentderiver/documentmanager.cfg
deleted file mode 100644
index 2ab99b75aef..00000000000
--- a/config-model/src/test/derived/documentderiver/documentmanager.cfg
+++ /dev/null
@@ -1,394 +0,0 @@
-enablecompression false
-datatype[].id 1381038251
-datatype[].structtype[].name "position"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "x"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "y"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -843666531
-datatype[].structtype[].name "compressed_body.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "from"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id 1704844530
-datatype[].structtype[].name "compressed_body.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype LZ4
-datatype[].structtype[].compresslevel 6
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 0
-datatype[].structtype[].field[].name "content"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id 1417245026
-datatype[].documenttype[].name "compressed_body"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct -843666531
-datatype[].documenttype[].bodystruct 1704844530
-datatype[].id -484354914
-datatype[].structtype[].name "compressed_both.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype LZ4
-datatype[].structtype[].compresslevel 6
-datatype[].structtype[].compressthreshold 50
-datatype[].structtype[].compressminsize 0
-datatype[].structtype[].field[].name "from"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -1007627725
-datatype[].structtype[].name "compressed_both.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype LZ4
-datatype[].structtype[].compresslevel 9
-datatype[].structtype[].compressthreshold 90
-datatype[].structtype[].compressminsize 0
-datatype[].structtype[].field[].name "content"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id 1417705345
-datatype[].documenttype[].name "compressed_both"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct -484354914
-datatype[].documenttype[].bodystruct -1007627725
-datatype[].id -940182894
-datatype[].structtype[].name "compressed_header.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype LZ4
-datatype[].structtype[].compresslevel 9
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 0
-datatype[].structtype[].field[].name "from"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -579052249
-datatype[].structtype[].name "compressed_header.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "content"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id 1946084365
-datatype[].documenttype[].name "compressed_header"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct -940182894
-datatype[].documenttype[].bodystruct -579052249
-datatype[].id -88808602
-datatype[].structtype[].name "mail.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "URI"
-datatype[].structtype[].field[].datatype 10
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "mailid"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "date"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "from"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "replyto"
-datatype[].structtype[].field[].datatype 3
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "to"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "cc"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "bcc"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "subject"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -1244861287
-datatype[].arraytype[].datatype 3
-datatype[].id -953584901
-datatype[].structtype[].name "mail.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "mailbody"
-datatype[].structtype[].field[].datatype 3
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attachmentcount"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attachmentnames"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attachmenttypes"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attachmentlanguages"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attachmentcontent"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attachments"
-datatype[].structtype[].field[].datatype -1244861287
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -1081574983
-datatype[].documenttype[].name "mail"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct -88808602
-datatype[].documenttype[].bodystruct -953584901
-datatype[].id -1486737430
-datatype[].arraytype[].datatype 2
-datatype[].id 519906144
-datatype[].weightedsettype[].datatype 0
-datatype[].weightedsettype[].createifnonexistant false
-datatype[].weightedsettype[].removeifzero false
-datatype[].id 363959257
-datatype[].weightedsettype[].datatype 0
-datatype[].weightedsettype[].createifnonexistant true
-datatype[].weightedsettype[].removeifzero true
-datatype[].id -1910204744
-datatype[].structtype[].name "music.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "url"
-datatype[].structtype[].field[].datatype 10
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "title"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "artist"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "year"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "description"
-datatype[].structtype[].field[].datatype 3
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "tracks"
-datatype[].structtype[].field[].datatype -1486737430
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "popularity"
-datatype[].structtype[].field[].datatype 519906144
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "popularity2"
-datatype[].structtype[].field[].datatype 363959257
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "popularity3"
-datatype[].structtype[].field[].datatype 363959257
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id 993120973
-datatype[].structtype[].name "music.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].id 1412693671
-datatype[].documenttype[].name "music"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct -1910204744
-datatype[].documenttype[].bodystruct 993120973
-datatype[].id 2006483754
-datatype[].structtype[].name "newssummary.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "title"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "abstract"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcename"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "providername"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "thumburl"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "thumbwidth"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "thumbheight"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "language"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "crawldocid"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "url"
-datatype[].structtype[].field[].datatype 10
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourceurl"
-datatype[].structtype[].field[].datatype 10
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "categories"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "pubdate"
-datatype[].structtype[].field[].datatype 4
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "expdate"
-datatype[].structtype[].field[].datatype 4
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "fingerprint"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "debug"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "attributes"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "searchcluster"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "eustaticrank"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "usstaticrank"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "asiastaticrank"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -2059783233
-datatype[].structtype[].name "newssummary.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].id -756330891
-datatype[].documenttype[].name "newssummary"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct 2006483754
-datatype[].documenttype[].bodystruct -2059783233
-datatype[].id 2098419674
-datatype[].structtype[].name "newsarticle.header"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "dynabstract"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "othersourcenames"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "author"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "otherlanguages"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "charset"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "mimetype"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "referrerurl"
-datatype[].structtype[].field[].datatype 10
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcelocation"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcecountry"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcelocale"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcecontinent"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "articlecountry"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "articlelocale"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "articlecontinent"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcerank"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "crawldate"
-datatype[].structtype[].field[].datatype 4
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "indexdate"
-datatype[].structtype[].field[].datatype 4
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "procdate"
-datatype[].structtype[].field[].datatype 4
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourceid"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].structtype[].field[].name "sourcefeedid"
-datatype[].structtype[].field[].datatype 0
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id 197293167
-datatype[].structtype[].name "newsarticle.body"
-datatype[].structtype[].version 0
-datatype[].structtype[].compresstype NONE
-datatype[].structtype[].compresslevel 0
-datatype[].structtype[].compressthreshold 95
-datatype[].structtype[].compressminsize 800
-datatype[].structtype[].field[].name "body"
-datatype[].structtype[].field[].datatype 2
-datatype[].structtype[].field[].detailedtype ""
-datatype[].id -1710661691
-datatype[].documenttype[].name "newsarticle"
-datatype[].documenttype[].version 0
-datatype[].documenttype[].inherits[].name "document"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].inherits[].name "newssummary"
-datatype[].documenttype[].inherits[].version 0
-datatype[].documenttype[].headerstruct 2098419674
-datatype[].documenttype[].bodystruct 197293167
diff --git a/config-model/src/test/derived/documentderiver/mail.sd b/config-model/src/test/derived/documentderiver/mail.sd
deleted file mode 100644
index 87bf8bada45..00000000000
--- a/config-model/src/test/derived/documentderiver/mail.sd
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search mail {
-
- stemming: none
-
- document mail {
-
- field URI type uri {
- indexing: summary
- summary-to: default, mailid
- }
-
- field mailid type string {
- indexing: summary | index
- match: prefix
- summary-to: default, mailid
- }
-
- field date type int {
- indexing: summary | attribute | index
- match: prefix
- }
-
- field from type string {
- indexing: summary | index
- # index-to: from, sender, address, header, default, all
- match: prefix
- }
-
- field replyto type raw {
- indexing: summary | index
- # index-to: replyto
- match: prefix
- }
-
- field to type string {
- indexing: summary | index
- # index-to: to, recipient, address, header, default, all
- match: prefix
- }
-
- field cc type string {
- indexing: index
- # index-to: cc, recipient, address, header, default, all
- match: prefix
- }
-
- field bcc type string {
- indexing: index
- # index-to: bcc
- match: prefix
- }
-
- field subject type string {
- indexing: summary | index
- # index-to: subject, header, default, all
- match: prefix
- }
-
- field mailbody type raw {
- indexing: summary | index
- # index-to: mailbody, default, all
- match: substring
- body
- }
-
- field attachmentcount type int {
- indexing: summary | index
- body
- }
-
- field attachmentnames type string {
- indexing: index
- # index-to: attachmentname, all
- body
- }
-
- field attachmenttypes type string {
- indexing: index
- # index-to: attachmenttype, all
- body
- }
-
- field attachmentlanguages type string {
- indexing: index
- match: prefix
- body
- }
-
- field attachmentcontent type string {
- indexing: summary | index
- # index-to: attachment, all
- match: prefix
- body
- }
-
- field attachments type raw[] {
- body
- }
-
- }
-
- document-summary default {
- summary snippet type string {
- dynamic
- source: body, attachmentcontent
- }
-
- }
-
-}
-
diff --git a/config-model/src/test/derived/documentderiver/music.sd b/config-model/src/test/derived/documentderiver/music.sd
deleted file mode 100644
index a412d510861..00000000000
--- a/config-model/src/test/derived/documentderiver/music.sd
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search music {
-
- document music {
-
- # Link to album main page
- field url type uri { }
-
- # Title of album
- field title type string { }
-
- # Album artist
- field artist type string { }
-
- # Album production year
- field year type int { }
-
- # Album description - about the album
- field description type raw { }
-
- # Names of the album tracks
- field tracks type array<string> { }
-
- # How many have given this album the grade 0/1/2/3
- field popularity type weightedset<int> { }
-
- # How many have given this album the grade 0/1/2/3
- field popularity2 type weightedset<int> {
- weightedset: create-if-nonexistent
- weightedset: remove-if-zero
- }
-
- # How many have given this album the grade 0/1/2/3
- field popularity3 type weightedset<int> {
- weightedset {
- create-if-nonexistent
- remove-if-zero
- }
- }
-
- }
-
-}
-
diff --git a/config-model/src/test/derived/documentderiver/newsarticle.sd b/config-model/src/test/derived/documentderiver/newsarticle.sd
deleted file mode 100644
index d31c309726e..00000000000
--- a/config-model/src/test/derived/documentderiver/newsarticle.sd
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search newsarticle {
-
- document newsarticle inherits newssummary {
-
- field dynabstract type string {
- indexing: summary
- }
-
- field body type string {
- body
- indexing: summary | index
- # index-to: body, default
- stemming: none
- }
-
- field othersourcenames type string {
- indexing: summary | index
- # index-to: othersourcenames, source
- stemming: none
- }
-
- field author type string {
- indexing: summary | index
- stemming: none
- }
-
- field otherlanguages type string {
- indexing: summary | index
- # index-to: languages
- stemming: none
- }
-
- field charset type string {
- indexing: summary
- stemming: none
- }
-
- field mimetype type string {
- indexing: summary
- stemming: none
- }
-
- field referrerurl type uri {
- indexing: summary | lowercase | tokenize | index
- stemming: none
- }
-
- field sourcelocation type string {
- indexing: summary | index
- stemming: none
- alias: location
- }
-
- field sourcecountry type string {
- indexing: summary | index
- stemming: none
- # index-to: sourcecountry, sourcelocation
- }
-
- field sourcelocale type string {
- indexing: summary | index
- stemming: none
- # index-to: sourcelocale, sourcelocation
- }
-
- field sourcecontinent type string {
- indexing: summary | index
- stemming: none
- # index-to: sourcecontinent, sourcelocation
- }
-
- field articlecountry type string {
- indexing: summary | index
- stemming: none
- }
-
- field articlelocale type string {
- indexing: summary | index
- stemming: none
- }
-
- field articlecontinent type string {
- indexing: summary | index
- stemming: none
- }
-
- field sourcerank type int {
- indexing: summary | index | set_var tmpsourcerank
- }
-
- field crawldate type long {
- indexing: summary | index
- }
-
- field indexdate type long {
- indexing: now | summary | index
- }
-
- field procdate type long {
- indexing: summary | index
- }
-
- field sourceid type int {
- indexing: summary | index
- }
-
- field sourcefeedid type int {
- indexing: summary | index
- }
-
- }
-
- rank-profile date {
- }
-
- rank-profile usrank inherits default {
- }
-
- rank-profile eurank inherits default {
- }
-
- rank-profile asiarank inherits default {
- }
-
-}
diff --git a/config-model/src/test/derived/documentderiver/newssummary.sd b/config-model/src/test/derived/documentderiver/newssummary.sd
deleted file mode 100644
index c0fcf8c2d85..00000000000
--- a/config-model/src/test/derived/documentderiver/newssummary.sd
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search newssummary {
-
- document newssummary {
-
- field title type string {
- indexing: summary | index
- # index-to: title, titleabstract, default
- stemming: none
- alias: headline
- }
-
- field abstract type string {
- indexing: summary | index
- # index-to: abstract, titleabstract, default
- stemming: none
- }
-
- field sourcename type string {
- indexing: summary | index
- # index-to: sourcename, source
- stemming: none
- }
-
- field providername type string {
- indexing: summary | index
- # index-to: providername, source
- stemming: none
- alias: provider
- }
-
- field thumburl type string {
- indexing: summary | lowercase | tokenize | index
- stemming: none
- }
-
- field thumbwidth type int {
- indexing: summary | index
- }
-
- field thumbheight type int {
- indexing: summary | index
- }
-
- field language type string {
- indexing: summary | index
- # index-to: language, languages
- stemming: none
- }
-
- field crawldocid type string {
- indexing: summary
- stemming: none
- }
-
- field url type uri {
- indexing: summary | lowercase | tokenize | index
- stemming: none
- }
-
- field sourceurl type uri {
- indexing: summary | lowercase | tokenize | index
- stemming: none
- }
-
- field categories type string {
- indexing: summary | index
- stemming: none
- alias: category
- alias: cat
- }
-
- field pubdate type long {
- indexing: summary | index | attribute pubdate | set_var tmppubdate
- alias: date
- }
-
- field expdate type long {
- indexing: summary | index
- }
-
- field fingerprint type int {
- indexing: summary | index
- }
-
- field debug type string {
- indexing {
-
- # Initialize variables used for superduper ranking
- 0 | set_var superduperus | set_var superdupereu | set_var superduperasia;
-
- input debug | lowercase | summary | normalize | tokenize | index;
- input debug | lowercase | split ";" | for_each {
- # Loop through each token in debug string
- switch {
- case "superduperus": 10 | set_var superduperus;
- case "superdupereu": 10 | set_var superdupereu;
- case "superduperasia": 10 | set_var superduperasia;
- }
- };
- }
- indexing-rewrite: none
- stemming: none
- }
-
- field attributes type string {
- indexing {
-
- # Initialize variables used for superduper ranking
- 1 | set_var superdupermod;
-
- input attributes | lowercase | summary | normalize | tokenize | index;
- input attributes | lowercase | split ";" | for_each {
- # Loop through each token in attributes string
- switch {
-
- # De-rank PR articles using the following rules:
- # 1. Set editedstaticrank to '1'
- # 2. Subtract 2.5 hours (9000 seconds) from timestamp used in ranking
- # 3. No superduper rank
- case "typepr": 1 | set_var tmpsourcerank | get_var tmppubdate - 9000 | set_var tmppubdate | 0 | set_var superdupermod;
- }
- };
- }
- indexing-rewrite: none
- stemming: none
- }
-
- field searchcluster type string {
- indexing: summary
- stemming: none
- }
-
- field eustaticrank type int {
- indexing {
- get_var tmpsourcerank * 4000 + get_var superdupereu * get_var superdupermod * 1000 + get_var tmppubdate * 0.5 | summary | index | attribute eustaticrank;
- }
- }
-
- field usstaticrank type int {
- indexing {
- get_var tmpsourcerank * 4000 + get_var superduperus * get_var superdupermod * 1000 + get_var tmppubdate * 0.5 | summary | index | attribute usstaticrank;
- }
- }
-
- field asiastaticrank type int {
- indexing {
- get_var tmpsourcerank * 4000 + get_var superduperasia * get_var superdupermod * 1000 + get_var tmppubdate * 0.5 | summary | index | attribute asiastaticrank;
- }
- }
- }
-
- rank-profile date {
- }
-
- rank-profile usrank inherits default {
- }
-
- rank-profile eurank inherits default {
- }
-
- rank-profile asiarank inherits default {
- }
-
-}
diff --git a/config-model/src/test/derived/documentderiver/sombrero.sd b/config-model/src/test/derived/documentderiver/sombrero.sd
deleted file mode 100644
index 00bd80bc42a..00000000000
--- a/config-model/src/test/derived/documentderiver/sombrero.sd
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search webdoc {
- document webdoc {
- #
- # a simple key-value pair
- #
- struct keyvalue {
- field key type string {}
- field value type string {}
- }
-
- #
- # tags have a name and an array of attributes
- #
- struct tagvalue {
- field name type string {}
- # todo: this should be a map of attributes, not an array
- field attributes type array<keyvalue> {}
- }
-
- #
- # wordforms are (kind, form, weight) triplets
- # todo: "kind" should be an enum; check how enums are used.
- #
- struct wordform {
- field kind type int {}
- field form type string {}
- field weight type float {}
- }
-
- #
- # web documents have zero or more HTML source strings
- #
- field html type string {}
- }
-}
diff --git a/config-model/src/test/derived/documentderiver/vsmfields.cfg b/config-model/src/test/derived/documentderiver/vsmfields.cfg
deleted file mode 100644
index cd8bc659398..00000000000
--- a/config-model/src/test/derived/documentderiver/vsmfields.cfg
+++ /dev/null
@@ -1,390 +0,0 @@
-fieldspec[].name sddocname
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "exact"
-fieldspec[].name title
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name abstract
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourcename
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name providername
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name thumburl
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name thumbwidth
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name thumbheight
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name language
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name crawldocid
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name url
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourceurl
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name categories
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name pubdate
-fieldspec[].searchmethod INT64
-fieldspec[].arg1 ""
-fieldspec[].name expdate
-fieldspec[].searchmethod INT64
-fieldspec[].arg1 ""
-fieldspec[].name fingerprint
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name debug
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name attributes
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name searchcluster
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name eustaticrank
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name usstaticrank
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name asiastaticrank
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name dynabstract
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name body
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name othersourcenames
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name author
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name otherlanguages
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name charset
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name mimetype
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name referrerurl
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourcelocation
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourcecountry
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourcelocale
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourcecontinent
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name articlecountry
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name articlelocale
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name articlecontinent
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name sourcerank
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name crawldate
-fieldspec[].searchmethod INT64
-fieldspec[].arg1 ""
-fieldspec[].name indexdate
-fieldspec[].searchmethod INT64
-fieldspec[].arg1 ""
-fieldspec[].name procdate
-fieldspec[].searchmethod INT64
-fieldspec[].arg1 ""
-fieldspec[].name sourceid
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name sourcefeedid
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name URI
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name mailid
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name date
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name from
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name replyto
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name to
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name cc
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name bcc
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name subject
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name mailbody
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "substring"
-fieldspec[].name attachmentcount
-fieldspec[].searchmethod INT32
-fieldspec[].arg1 ""
-fieldspec[].name attachmentnames
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name attachmenttypes
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 ""
-fieldspec[].name attachmentlanguages
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-fieldspec[].name attachmentcontent
-fieldspec[].searchmethod AUTOUTF8
-fieldspec[].arg1 "prefix"
-documenttype[].name newssummary
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
-documenttype[].index[].name title
-documenttype[].index[].field[].name title
-documenttype[].index[].name titleabstract
-documenttype[].index[].field[].name title
-documenttype[].index[].field[].name abstract
-documenttype[].index[].name default
-documenttype[].index[].field[].name title
-documenttype[].index[].field[].name abstract
-documenttype[].index[].name abstract
-documenttype[].index[].field[].name abstract
-documenttype[].index[].name sourcename
-documenttype[].index[].field[].name sourcename
-documenttype[].index[].name source
-documenttype[].index[].field[].name sourcename
-documenttype[].index[].field[].name providername
-documenttype[].index[].name providername
-documenttype[].index[].field[].name providername
-documenttype[].index[].name thumburl
-documenttype[].index[].field[].name thumburl
-documenttype[].index[].name thumbwidth
-documenttype[].index[].field[].name thumbwidth
-documenttype[].index[].name thumbheight
-documenttype[].index[].field[].name thumbheight
-documenttype[].index[].name language
-documenttype[].index[].field[].name language
-documenttype[].index[].name languages
-documenttype[].index[].field[].name language
-documenttype[].index[].name url
-documenttype[].index[].field[].name url
-documenttype[].index[].name sourceurl
-documenttype[].index[].field[].name sourceurl
-documenttype[].index[].name categories
-documenttype[].index[].field[].name categories
-documenttype[].index[].name pubdate
-documenttype[].index[].field[].name pubdate
-documenttype[].index[].name expdate
-documenttype[].index[].field[].name expdate
-documenttype[].index[].name fingerprint
-documenttype[].index[].field[].name fingerprint
-documenttype[].index[].name debug
-documenttype[].index[].field[].name debug
-documenttype[].index[].name attributes
-documenttype[].index[].field[].name attributes
-documenttype[].index[].name eustaticrank
-documenttype[].index[].field[].name eustaticrank
-documenttype[].index[].name usstaticrank
-documenttype[].index[].field[].name usstaticrank
-documenttype[].index[].name asiastaticrank
-documenttype[].index[].field[].name asiastaticrank
-documenttype[].name newsarticle
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
-documenttype[].index[].name title
-documenttype[].index[].field[].name title
-documenttype[].index[].name titleabstract
-documenttype[].index[].field[].name title
-documenttype[].index[].field[].name abstract
-documenttype[].index[].name default
-documenttype[].index[].field[].name title
-documenttype[].index[].field[].name abstract
-documenttype[].index[].field[].name body
-documenttype[].index[].name abstract
-documenttype[].index[].field[].name abstract
-documenttype[].index[].name sourcename
-documenttype[].index[].field[].name sourcename
-documenttype[].index[].name source
-documenttype[].index[].field[].name sourcename
-documenttype[].index[].field[].name providername
-documenttype[].index[].field[].name othersourcenames
-documenttype[].index[].name providername
-documenttype[].index[].field[].name providername
-documenttype[].index[].name thumburl
-documenttype[].index[].field[].name thumburl
-documenttype[].index[].name thumbwidth
-documenttype[].index[].field[].name thumbwidth
-documenttype[].index[].name thumbheight
-documenttype[].index[].field[].name thumbheight
-documenttype[].index[].name language
-documenttype[].index[].field[].name language
-documenttype[].index[].name languages
-documenttype[].index[].field[].name language
-documenttype[].index[].field[].name otherlanguages
-documenttype[].index[].name url
-documenttype[].index[].field[].name url
-documenttype[].index[].name sourceurl
-documenttype[].index[].field[].name sourceurl
-documenttype[].index[].name categories
-documenttype[].index[].field[].name categories
-documenttype[].index[].name pubdate
-documenttype[].index[].field[].name pubdate
-documenttype[].index[].name expdate
-documenttype[].index[].field[].name expdate
-documenttype[].index[].name fingerprint
-documenttype[].index[].field[].name fingerprint
-documenttype[].index[].name debug
-documenttype[].index[].field[].name debug
-documenttype[].index[].name attributes
-documenttype[].index[].field[].name attributes
-documenttype[].index[].name eustaticrank
-documenttype[].index[].field[].name eustaticrank
-documenttype[].index[].name usstaticrank
-documenttype[].index[].field[].name usstaticrank
-documenttype[].index[].name asiastaticrank
-documenttype[].index[].field[].name asiastaticrank
-documenttype[].index[].name body
-documenttype[].index[].field[].name body
-documenttype[].index[].name othersourcenames
-documenttype[].index[].field[].name othersourcenames
-documenttype[].index[].name author
-documenttype[].index[].field[].name author
-documenttype[].index[].name referrerurl
-documenttype[].index[].field[].name referrerurl
-documenttype[].index[].name sourcelocation
-documenttype[].index[].field[].name sourcelocation
-documenttype[].index[].field[].name sourcecountry
-documenttype[].index[].field[].name sourcelocale
-documenttype[].index[].field[].name sourcecontinent
-documenttype[].index[].name sourcecountry
-documenttype[].index[].field[].name sourcecountry
-documenttype[].index[].name sourcelocale
-documenttype[].index[].field[].name sourcelocale
-documenttype[].index[].name sourcecontinent
-documenttype[].index[].field[].name sourcecontinent
-documenttype[].index[].name articlecountry
-documenttype[].index[].field[].name articlecountry
-documenttype[].index[].name articlelocale
-documenttype[].index[].field[].name articlelocale
-documenttype[].index[].name articlecontinent
-documenttype[].index[].field[].name articlecontinent
-documenttype[].index[].name sourcerank
-documenttype[].index[].field[].name sourcerank
-documenttype[].index[].name crawldate
-documenttype[].index[].field[].name crawldate
-documenttype[].index[].name indexdate
-documenttype[].index[].field[].name indexdate
-documenttype[].index[].name procdate
-documenttype[].index[].field[].name procdate
-documenttype[].index[].name sourceid
-documenttype[].index[].field[].name sourceid
-documenttype[].index[].name sourcefeedid
-documenttype[].index[].field[].name sourcefeedid
-documenttype[].name music
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
-documenttype[].name mail
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
-documenttype[].index[].name mailid
-documenttype[].index[].field[].name mailid
-documenttype[].index[].name date
-documenttype[].index[].field[].name date
-documenttype[].index[].name from
-documenttype[].index[].field[].name from
-documenttype[].index[].name sender
-documenttype[].index[].field[].name from
-documenttype[].index[].name address
-documenttype[].index[].field[].name from
-documenttype[].index[].field[].name to
-documenttype[].index[].field[].name cc
-documenttype[].index[].name header
-documenttype[].index[].field[].name from
-documenttype[].index[].field[].name to
-documenttype[].index[].field[].name cc
-documenttype[].index[].field[].name subject
-documenttype[].index[].name default
-documenttype[].index[].field[].name from
-documenttype[].index[].field[].name to
-documenttype[].index[].field[].name cc
-documenttype[].index[].field[].name subject
-documenttype[].index[].field[].name mailbody
-documenttype[].index[].name all
-documenttype[].index[].field[].name from
-documenttype[].index[].field[].name to
-documenttype[].index[].field[].name cc
-documenttype[].index[].field[].name subject
-documenttype[].index[].field[].name mailbody
-documenttype[].index[].field[].name attachmentnames
-documenttype[].index[].field[].name attachmenttypes
-documenttype[].index[].field[].name attachmentcontent
-documenttype[].index[].name replyto
-documenttype[].index[].field[].name replyto
-documenttype[].index[].name to
-documenttype[].index[].field[].name to
-documenttype[].index[].name recipient
-documenttype[].index[].field[].name to
-documenttype[].index[].field[].name cc
-documenttype[].index[].name cc
-documenttype[].index[].field[].name cc
-documenttype[].index[].name bcc
-documenttype[].index[].field[].name bcc
-documenttype[].index[].name subject
-documenttype[].index[].field[].name subject
-documenttype[].index[].name mailbody
-documenttype[].index[].field[].name mailbody
-documenttype[].index[].name attachmentcount
-documenttype[].index[].field[].name attachmentcount
-documenttype[].index[].name attachmentname
-documenttype[].index[].field[].name attachmentnames
-documenttype[].index[].name attachmenttype
-documenttype[].index[].field[].name attachmenttypes
-documenttype[].index[].name attachmentlanguages
-documenttype[].index[].field[].name attachmentlanguages
-documenttype[].index[].name attachment
-documenttype[].index[].field[].name attachmentcontent
-documenttype[].name compressed_header
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
-documenttype[].name compressed_both
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
-documenttype[].name compressed_body
-documenttype[].index[].name sddocname
-documenttype[].index[].field[].name sddocname
diff --git a/config-model/src/test/derived/documentderiver/vsmsummary.cfg b/config-model/src/test/derived/documentderiver/vsmsummary.cfg
deleted file mode 100644
index 03513244430..00000000000
--- a/config-model/src/test/derived/documentderiver/vsmsummary.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-fieldmap[].summary snippet
-fieldmap[].document[].field body
-fieldmap[].document[].field attachmentcontent
-fieldmap[].command FLATTENJUNIPER
diff --git a/config-model/src/test/derived/inheritancebadtypes/child.sd b/config-model/src/test/derived/inheritancebadtypes/child.sd
deleted file mode 100644
index 3a204e95154..00000000000
--- a/config-model/src/test/derived/inheritancebadtypes/child.sd
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search child {
-document child inherits parent {
- field a type int {
- indexing: index
- }
-}
-}
diff --git a/config-model/src/test/derived/inheritancebadtypes/parent.sd b/config-model/src/test/derived/inheritancebadtypes/parent.sd
deleted file mode 100644
index 4fec1b4179f..00000000000
--- a/config-model/src/test/derived/inheritancebadtypes/parent.sd
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search parent {
-document parent {
- field a type string {
- indexing: index
- }
-}
-}
diff --git a/config-model/src/test/examples/attributeindex.sd b/config-model/src/test/examples/attributeindex.sd
deleted file mode 100644
index a35be556467..00000000000
--- a/config-model/src/test/examples/attributeindex.sd
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search attributeindex {
- document attributeindex {
-
- field nosettings type string {
- indexing: summary | attribute | index
- }
-
- # Attribute and index have different names
- field specifyname type string {
- indexing: summary | attribute newname | index
- }
-
- # # index-to: with same name as attribute
- field specifyname2 type string {
- indexing: summary | attribute newname2 | index
- # index-to: newname2
- }
-
- field withstaticrankname type string {
- indexing: summary | attribute | index | attribute someothername
- }
- }
-}
diff --git a/config-model/src/test/examples/attributeproperties1.sd b/config-model/src/test/examples/attributeproperties1.sd
deleted file mode 100644
index 233e6656866..00000000000
--- a/config-model/src/test/examples/attributeproperties1.sd
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search bolding {
- document test {
-
- # Setting attribute properties for a non-existent attribute should fail
- field batchid type int {
- indexing: summary | index
- attribute {
- prefetch
- }
- }
-
- # ... but this is OK
- field anotherbatchid type int {
- indexing: summary | index | attribute
- attribute {
- prefetch
- }
- }
- }
-}
diff --git a/config-model/src/test/examples/attributeproperties2.sd b/config-model/src/test/examples/attributeproperties2.sd
deleted file mode 100644
index 9c5e3e1a07f..00000000000
--- a/config-model/src/test/examples/attributeproperties2.sd
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-search bolding {
- document bolding {
-
- # This is how it usually should be
- field anotherbatchid type int {
- indexing: summary | index | attribute
- attribute {
- prefetch
- }
- attribute: huge
- }
-
- # The attribute is created in the next field
- field bar type int {
- indexing: summary | index
- attribute {
- prefetch
- }
- }
-
- # Creates attribute for the previous field
- field foo type int {
- indexing: input bar | attribute bar
- }
- }
-}
diff --git a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java
index 8331ada2271..528393e4135 100644
--- a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java
+++ b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java
@@ -14,7 +14,7 @@ import com.yahoo.document.DataType;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.io.IOUtils;
import com.yahoo.searchdefinition.Search;
-import com.yahoo.searchdefinition.UnproperSearch;
+import com.yahoo.searchdefinition.DocumentOnlySearch;
import com.yahoo.vespa.config.ConfigDefinition;
import com.yahoo.vespa.config.ConfigDefinitionKey;
import com.yahoo.vespa.model.VespaModel;
@@ -72,7 +72,7 @@ public class ApplicationDeployTest {
case "sock":
break;
case "product":
- assertTrue(s instanceof UnproperSearch);
+ assertTrue(s instanceof DocumentOnlySearch);
assertEquals(s.getDocument().getField("title").getDataType(), DataType.STRING);
break;
default:
diff --git a/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java b/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java
index 5bd95334396..948c62c2343 100644
--- a/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java
+++ b/config-model/src/test/java/com/yahoo/config/model/MockModelContext.java
@@ -133,6 +133,9 @@ public class MockModelContext implements ModelContext {
@Override
public boolean isFirstTimeDeployment() { return false; }
+
+ @Override
+ public boolean useDedicatedNodeForLogserver() { return false; }
};
}
}
diff --git a/config-model/src/test/java/com/yahoo/config/model/application/provider/SchemaValidatorTest.java b/config-model/src/test/java/com/yahoo/config/model/application/provider/SchemaValidatorTest.java
index fda230e22ab..5c4b51ca3fa 100644
--- a/config-model/src/test/java/com/yahoo/config/model/application/provider/SchemaValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/config/model/application/provider/SchemaValidatorTest.java
@@ -2,6 +2,7 @@
package com.yahoo.config.model.application.provider;
import com.yahoo.component.Version;
+import com.yahoo.vespa.config.VespaVersion;
import org.junit.Test;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -65,6 +66,6 @@ public class SchemaValidatorTest {
}
private SchemaValidator createValidator() throws IOException {
- return new SchemaValidators(new Version(6)).servicesXmlValidator();
+ return new SchemaValidators(new Version(VespaVersion.major)).servicesXmlValidator();
}
}
diff --git a/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java b/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java
index dd28d45ef4d..32a881633b8 100644
--- a/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java
+++ b/config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java
@@ -48,6 +48,7 @@ import java.util.stream.Collectors;
import static com.yahoo.config.model.test.TestUtil.joinLines;
import static com.yahoo.vespa.defaults.Defaults.getDefaults;
+import static org.hamcrest.CoreMatchers.both;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.collection.IsIn.isIn;
import static org.hamcrest.core.Every.everyItem;
@@ -947,11 +948,11 @@ public class ModelProvisioningTest {
" <nodes count='1'/>" +
" </container>" +
"</services>";
- testContainerOnLogserverHost(services);
+ boolean useDedicatedNodeForLogserver = false;
+ testContainerOnLogserverHost(services, useDedicatedNodeForLogserver);
}
@Test
- @Ignore // Ignore until we create container on logserver implicitly
public void testImplicitLogserverContainer() {
String services =
"<?xml version='1.0' encoding='utf-8' ?>\n" +
@@ -960,7 +961,8 @@ public class ModelProvisioningTest {
" <nodes count='1'/>" +
" </container>" +
"</services>";
- testContainerOnLogserverHost(services);
+ boolean useDedicatedNodeForLogserver = true;
+ testContainerOnLogserverHost(services, useDedicatedNodeForLogserver);
}
@Test
@@ -1751,9 +1753,10 @@ public class ModelProvisioningTest {
// Tests that a container is allocated on logserver host and that
// it is able to get config
- private void testContainerOnLogserverHost(String services) {
+ private void testContainerOnLogserverHost(String services, boolean useDedicatedNodeForLogserver) {
int numberOfHosts = 2;
VespaModelTester tester = new VespaModelTester();
+ tester.useDedicatedNodeForLogserver(useDedicatedNodeForLogserver);
tester.addHosts(numberOfHosts);
Zone zone = new Zone(SystemName.cd, Environment.prod, RegionName.defaultName());
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java
index 76ea16e47aa..846166ae93c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java
@@ -12,6 +12,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+
/**
* tests importing of document containing array type fields
*
@@ -21,7 +22,7 @@ public class ArraysTestCase extends SearchDefinitionTestCase {
@Test
public void testArrayImporting() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/arrays.sd");
+ Search search = SearchBuilder.buildFromFile("src/test/examples/arrays.sd");
SDField tags = (SDField)search.getDocument().getField("tags");
assertEquals(DataType.STRING, ((CollectionDataType)tags.getDataType()).getNestedType());
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java
index 376832c1649..5a5fc1cc312 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java
@@ -15,7 +15,7 @@ public class ReservedWordsAsFieldNamesTestCase extends SearchDefinitionTestCase
@Test
public void testIt() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/reserved_words_as_field_names.sd");
+ Search search = SearchBuilder.buildFromFile("src/test/examples/reserved_words_as_field_names.sd");
assertNotNull(search.getDocument().getField("inline"));
assertNotNull(search.getDocument().getField("constants"));
assertNotNull(search.getDocument().getField("reference"));
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
index 82c03c02f61..127ed7a528b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
@@ -5,7 +5,11 @@ import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.document.DataType;
import com.yahoo.document.Document;
import com.yahoo.search.query.profile.QueryProfileRegistry;
-import com.yahoo.searchdefinition.document.*;
+import com.yahoo.searchdefinition.document.Attribute;
+import com.yahoo.searchdefinition.document.RankType;
+import com.yahoo.searchdefinition.document.SDDocumentType;
+import com.yahoo.searchdefinition.document.SDField;
+import com.yahoo.searchdefinition.document.Stemming;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.searchdefinition.processing.MakeAliases;
import com.yahoo.vespa.documentmodel.SummaryTransform;
@@ -27,7 +31,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
@Test
public void testSimpleImporting() throws IOException, ParseException {
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
- SearchBuilder sb = new UnprocessingSearchBuilder(rankProfileRegistry, new QueryProfileRegistry());
+ SearchBuilder sb = new SearchBuilder(rankProfileRegistry, new QueryProfileRegistry());
sb.importFile("src/test/examples/simple.sd");
sb.build();
Search search = sb.getSearch();
@@ -36,7 +40,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
SDDocumentType document = search.getDocument();
assertEquals("simple", document.getName());
- assertEquals(12, document.getFieldCount());
+ assertEquals(25, document.getFieldCount());
SDField field;
Attribute attribute;
@@ -46,7 +50,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
// First field
field=(SDField) document.getField("title");
assertEquals(DataType.STRING,field.getDataType());
- assertEquals("{ summary | index; }", field.getIndexingScript().toString());
+ assertEquals("{ input title | tokenize normalize stem:\"SHORTEST\" | summary title | index title; }", field.getIndexingScript().toString());
assertTrue(!search.getIndex("default").isPrefix());
assertTrue(search.getIndex("title").isPrefix());
Iterator<String> titleAliases=search.getIndex("title").aliasIterator();
@@ -85,7 +89,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
// Fifth field
field=(SDField) document.getField("popularity");
- assertEquals("{ attribute; }",
+ assertEquals("{ input popularity | attribute popularity; }",
field.getIndexingScript().toString());
// Sixth field
@@ -96,19 +100,19 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
// Seventh field
field= search.getConcreteField("categories");
- assertEquals("{ input categories_src | lowercase | normalize | index; }",
+ assertEquals("{ input categories_src | lowercase | normalize | tokenize normalize stem:\"SHORTEST\" | index categories; }",
field.getIndexingScript().toString());
assertTrue(!field.isHeader());
// Eight field
field= search.getConcreteField("categoriesagain");
- assertEquals("{ input categoriesagain_src | lowercase | normalize | index; }",
+ assertEquals("{ input categoriesagain_src | lowercase | normalize | tokenize normalize stem:\"SHORTEST\" | index categoriesagain; }",
field.getIndexingScript().toString());
assertTrue(field.isHeader());
// Ninth field
field= search.getConcreteField("exactemento");
- assertEquals("{ input exactemento_src | lowercase | index | summary; }",
+ assertEquals("{ input exactemento_src | lowercase | tokenize normalize stem:\"SHORTEST\" | index exactemento | summary exactemento; }",
field.getIndexingScript().toString());
// Tenth field
@@ -153,7 +157,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
assertEquals("exact",exact.getName());
assertEquals(Stemming.NONE,exact.getStemming());
assertTrue(!exact.getNormalizing().doRemoveAccents());
- assertEquals("{ input title . \" \" . input category | summary | index; }",
+ assertEquals("{ input title . \" \" . input category | tokenize | summary exact | index exact; }",
exact.getIndexingScript().toString());
assertEquals(RankType.IDENTITY, exact.getRankType());
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java
index 5b95789bea4..defff99d51e 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java
@@ -20,7 +20,7 @@ public class StemmingSettingTestCase extends SearchDefinitionTestCase {
@Test
public void testStemmingSettings() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/stemmingsetting.sd");
+ Search search = SearchBuilder.buildFromFile("src/test/examples/stemmingsetting.sd");
SDField artist = (SDField)search.getDocument().getField("artist");
assertEquals(Stemming.SHORTEST, artist.getStemming(search));
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/DocumentDeriverTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/DocumentDeriverTestCase.java
deleted file mode 100644
index 8e0f77c941c..00000000000
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/DocumentDeriverTestCase.java
+++ /dev/null
@@ -1,114 +0,0 @@
-// 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.document.*;
-import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.document.SDDocumentType;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
-/**
- * Tests deriving of documentmanager
- *
- * @author <a href="mailto:mathiasm@yahoo-inc.com">Mathias Moelster Lidal</a>
- */
-public class DocumentDeriverTestCase extends AbstractExportingTestCase {
- @Test
- public void testDocumentDeriving() {
- String root = "src/test/derived/documentderiver/";
-
- List<String> files = new ArrayList<>();
- files.add(root + "newsarticle.sd");
- files.add(root + "newssummary.sd");
- files.add(root + "music.sd");
- files.add(root + "mail.sd");
- files.add(root + "compression_header.sd");
- files.add(root + "compression_both.sd");
- files.add(root + "compression_body.sd");
-
- File toDir = new File("temp/documentderiver/");
- toDir.mkdir();
-
- SearchBuilder builder = Deriver.deriveDocuments(files, toDir.getPath());
- try {
- assertEqualFiles(root + "documentmanager.cfg", toDir.getPath() + "/documentmanager.cfg");
- } catch (IOException e) {
- throw new RuntimeException("Exception while comparing files", e);
- }
-
- SDDocumentType doc = builder.getSearch("newsarticle").getDocument();
- assertNotNull(doc);
- }
- @Test
- public void testStructTypesNotUsed() {
- String root = "src/test/derived/documentderiver/";
-
- List<String> files = new ArrayList<>();
- files.add(root + "sombrero.sd");
-
- File toDir = new File("temp/structtypesnotused/");
- toDir.mkdir();
-
- Deriver.deriveDocuments(files, toDir.getPath());
-
- DocumentTypeManager dtm = new DocumentTypeManager();
- int numBuiltInTypes = dtm.getDataTypes().size();
- dtm.configure("file:" + toDir.getPath() + "/documentmanager.cfg");
-
- DocumentType webDocType = dtm.getDocumentType("webdoc");
- assertNotNull(webDocType);
-
- assertEquals(1, webDocType.fieldSet().size());
- Field html = webDocType.getField("html");
- assertNotNull(html);
- assertEquals(DataType.STRING, html.getDataType());
-
- assertEquals(numBuiltInTypes + 8, dtm.getDataTypes().size());
-
- {
- StructDataType keyvalue = (StructDataType) dtm.getDataType("keyvalue");
- assertNotNull(keyvalue);
- assertEquals(2, keyvalue.getFields().size());
- Field key = keyvalue.getField("key");
- assertNotNull(key);
- assertEquals(DataType.STRING, key.getDataType());
- Field value = keyvalue.getField("value");
- assertNotNull(value);
- assertEquals(DataType.STRING, value.getDataType());
- }
- {
- StructDataType tagvalue = (StructDataType) dtm.getDataType("tagvalue");
- assertNotNull(tagvalue);
- assertEquals(2, tagvalue.getFields().size());
- Field name = tagvalue.getField("name");
- assertNotNull(name);
- assertEquals(DataType.STRING, name.getDataType());
- Field attributes = tagvalue.getField("attributes");
- assertNotNull(attributes);
- assertTrue(attributes.getDataType() instanceof ArrayDataType);
- assertEquals(dtm.getDataType("keyvalue"), ((ArrayDataType) attributes.getDataType()).getNestedType());
- }
- {
- StructDataType wordform = (StructDataType) dtm.getDataType("wordform");
- assertNotNull(wordform);
- assertEquals(3, wordform.getFields().size());
- Field kind = wordform.getField("kind");
- assertNotNull(kind);
- assertEquals(DataType.INT, kind.getDataType());
- Field form = wordform.getField("form");
- assertNotNull(form);
- assertEquals(DataType.STRING, form.getDataType());
- Field weight = wordform.getField("weight");
- assertNotNull(weight);
- assertEquals(DataType.FLOAT, weight.getDataType());
- }
-
- }
-
-}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java
index 2833e0ef004..f37a39d6f93 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java
@@ -158,18 +158,4 @@ public class InheritanceTestCase extends AbstractExportingTestCase {
assertEquals(new Index("prefixed", true), childSearch.getIndex("prefixed"));
}
- @Test
- public void testFailTypesMismatch() throws IOException, ParseException {
- String root = "src/test/derived/inheritancebadtypes/";
- List<String> files = new LinkedList<>();
- files.add(root + "parent.sd");
- files.add(root + "child.sd");
- File toDir = tmpDir.newFolder("to");
- try {
- Deriver.deriveDocuments(files, toDir.getPath());
- fail("Import of child SD with type mismatch worked.");
- } catch (RuntimeException e) {
- assertTrue(e.getMessage().matches(".*already contains field 'a'.*"));
- }
- }
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/MailTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/MailTestCase.java
index 8cf1846ed04..187e766c315 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/MailTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/MailTestCase.java
@@ -1,25 +1,13 @@
// 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.ConfigInstance;
-import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.UnprocessingSearchBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
-import com.yahoo.vespa.model.VespaModel;
-import com.yahoo.vespa.model.test.utils.VespaModelCreatorWithFilePkg;
import org.junit.Test;
-import org.xml.sax.SAXException;
-
-import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
/**
- * Tests VDS+streaming configuration deriving
+ * Tests streaming configuration deriving
*
* @author bratseth
*/
@@ -33,22 +21,4 @@ public class MailTestCase extends AbstractExportingTestCase {
assertCorrectDeriving(sb, dir);
}
- @Test
- public void testMailDocumentsonlyDeriving() {
- String root = "src/test/derived/mail/";
- File toDir = new File("temp/documentderiver/");
- if (!toDir.exists()) {
- toDir.mkdir();
- }
- List<String> files = new ArrayList<>();
- files.add(root + "mail.sd");
- Deriver.deriveDocuments(files, toDir.getPath());
- try {
- assertEqualFiles(root + "onlydoc/documentmanager.cfg",
- toDir.getPath() + "/documentmanager.cfg");
- } catch (IOException e) {
- throw new RuntimeException("Exception while comparing files", e);
- }
- }
-
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/StreamingStructTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/StreamingStructTestCase.java
index 1691d463fad..1be9ee3f465 100755
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/StreamingStructTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/StreamingStructTestCase.java
@@ -22,18 +22,7 @@ public class StreamingStructTestCase extends AbstractExportingTestCase {
@Test
public void testStreamingStructExplicitDefaultSummaryClass() throws IOException, ParseException {
- // Tests an issue for mail in Vespa 4.1; specific overrides of default summary class
assertCorrectDeriving("streamingstructdefault");
}
- @Test
- public void testStreamingStructDocumentsonlyDeriving() throws IOException {
- String root = "src/test/derived/streamingstruct/";
- String temp = "temp/documentderiver/";
- new File(temp).mkdir();
- Deriver.deriveDocuments(Arrays.asList(root + "streamingstruct.sd"), temp);
- assertEqualFiles(root + "/onlydoc/documentmanager.cfg",
- temp + "/documentmanager.cfg");
- }
-
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributeIndexTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributeIndexTestCase.java
deleted file mode 100644
index 29ab2d9e8e8..00000000000
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributeIndexTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.searchdefinition.processing;
-
-import com.yahoo.searchdefinition.Search;
-import com.yahoo.searchdefinition.SearchDefinitionTestCase;
-import com.yahoo.searchdefinition.UnprocessingSearchBuilder;
-import com.yahoo.searchdefinition.parser.ParseException;
-import org.junit.Test;
-
-import java.io.IOException;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-/**
- * Test AttributeIndex processor.
- *
- * @author hmusum
- */
-public class AttributeIndexTestCase extends SearchDefinitionTestCase {
- @Test
- public void testAttributeIndex() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/attributeindex.sd");
-
- assertTrue(search.getConcreteField("nosettings").getAttributes().get("nosettings") != null);
-
- assertTrue(search.getConcreteField("specifyname").getAttributes().get("newname") != null);
-
- assertTrue(search.getConcreteField("specifyname2").getAttributes().get("newname2") != null);
-
- assertTrue(search.getConcreteField("withstaticrankname").getAttributes().get("withstaticrankname") != null);
-
- assertTrue(search.getConcreteField("withstaticrankname").getAttributes().get("someothername") != null);
- }
-}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributePropertiesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributePropertiesTestCase.java
deleted file mode 100644
index 3a0fedfd550..00000000000
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributePropertiesTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.searchdefinition.processing;
-
-import com.yahoo.config.model.application.provider.BaseDeployLogger;
-import com.yahoo.searchdefinition.RankProfileRegistry;
-import com.yahoo.searchdefinition.Search;
-import com.yahoo.searchdefinition.SearchDefinitionTestCase;
-import com.yahoo.searchdefinition.UnprocessingSearchBuilder;
-import com.yahoo.searchdefinition.parser.ParseException;
-import com.yahoo.vespa.model.container.search.QueryProfiles;
-import org.junit.Test;
-
-import java.io.IOException;
-
-import static org.junit.Assert.fail;
-/**
- * Test AttributeProperties processor.
- *
- * @author hmusum
- */
-public class AttributePropertiesTestCase extends SearchDefinitionTestCase {
-
- @Test
- public void testInvalidAttributeProperties() throws IOException, ParseException {
- try {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/attributeproperties1.sd");
- new AttributeProperties(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
- fail("attribute property should not be set");
- } catch (RuntimeException e) {
- // empty
- }
- }
-
- @Test
- public void testValidAttributeProperties() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/attributeproperties2.sd");
- new AttributeProperties(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
- }
-
-}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoldingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoldingTestCase.java
index 1ab8b054cb7..ac3ba1d98d9 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoldingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoldingTestCase.java
@@ -4,8 +4,8 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
+import com.yahoo.searchdefinition.SearchBuilder;
import com.yahoo.searchdefinition.SearchDefinitionTestCase;
-import com.yahoo.searchdefinition.UnprocessingSearchBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import org.junit.Test;
@@ -23,7 +23,7 @@ public class BoldingTestCase extends SearchDefinitionTestCase {
@Test
public void testBoldingNonString() throws IOException, ParseException {
try {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/processing/boldnonstring.sd");
+ Search search = SearchBuilder.buildFromFile("src/test/processing/boldnonstring.sd");
new Bolding(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
fail();
} catch (IllegalArgumentException e) {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java
index 31631b0dc74..a8ba762b32b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java
@@ -4,8 +4,8 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
+import com.yahoo.searchdefinition.SearchBuilder;
import com.yahoo.searchdefinition.SearchDefinitionTestCase;
-import com.yahoo.searchdefinition.UnprocessingSearchBuilder;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
@@ -15,6 +15,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+
/**
* @author baldersheim
*/
@@ -22,7 +23,7 @@ public class IntegerIndex2AttributeTestCase extends SearchDefinitionTestCase {
@Test
public void testIntegerIndex2Attribute() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/integerindex2attribute.sd");
+ Search search = SearchBuilder.buildFromFile("src/test/examples/integerindex2attribute.sd");
new IntegerIndex2Attribute(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
SDField f;
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java
index 39ab7195892..dbcfc8c202d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java
@@ -2,8 +2,11 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.config.model.application.provider.BaseDeployLogger;
-import com.yahoo.searchdefinition.*;
+import com.yahoo.searchdefinition.RankProfileRegistry;
+import com.yahoo.searchdefinition.Search;
+import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import org.junit.Test;
@@ -17,9 +20,8 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends SearchDefinitionTe
@Test
public void requireThatInvalidSourceIsCaught() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/invalidsummarysource.sd");
try {
- new SummaryFieldsMustHaveValidSource(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
+ SearchBuilder.buildFromFile("src/test/examples/invalidsummarysource.sd");
fail("This should throw and never get here");
} catch (IllegalArgumentException e) {
assertEquals("For search 'invalidsummarysource', summary class 'baz', summary field 'cox': there is no valid source 'nonexistingfield'.", e.getMessage());
@@ -28,9 +30,8 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends SearchDefinitionTe
@Test
public void requireThatInvalidImplicitSourceIsCaught() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/invalidimplicitsummarysource.sd");
try {
- new SummaryFieldsMustHaveValidSource(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
+ SearchBuilder.buildFromFile("src/test/examples/invalidimplicitsummarysource.sd");
fail("This should throw and never get here");
} catch (IllegalArgumentException e) {
assertEquals("For search 'invalidsummarysource', summary class 'baz', summary field 'cox': there is no valid source 'cox'.", e.getMessage());
@@ -39,9 +40,8 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends SearchDefinitionTe
@Test
public void requireThatInvalidSelfReferingSingleSource() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/invalidselfreferringsummary.sd");
try {
- new SummaryFieldsMustHaveValidSource(search, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
+ SearchBuilder.buildFromFile("src/test/examples/invalidselfreferringsummary.sd");
fail("This should throw and never get here");
} catch (IllegalArgumentException e) {
assertEquals("For search 'invalidselfreferringsummary', summary class 'withid', summary field 'w': there is no valid source 'w'.", e.getMessage());
@@ -50,7 +50,7 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends SearchDefinitionTe
@Test
public void requireThatDocumentIdIsAllowedToPass() throws IOException, ParseException {
- Search search = UnprocessingSearchBuilder.buildUnprocessedFromFile("src/test/examples/documentidinsummary.sd");
+ Search search = SearchBuilder.buildFromFile("src/test/examples/documentidinsummary.sd");
BaseDeployLogger deployLogger = new BaseDeployLogger();
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
new SummaryFieldsMustHaveValidSource(search, deployLogger, rankProfileRegistry, new QueryProfiles()).process(true, false);
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/VespaModelFactoryTest.java b/config-model/src/test/java/com/yahoo/vespa/model/VespaModelFactoryTest.java
index 094494073df..e4198115b2a 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/VespaModelFactoryTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/VespaModelFactoryTest.java
@@ -216,6 +216,9 @@ public class VespaModelFactoryTest {
@Override
public boolean isFirstTimeDeployment() { return false; }
+
+ @Override
+ public boolean useDedicatedNodeForLogserver() { return false; }
};
}
};
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTester.java b/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTester.java
index 1023733a652..060fe96100d 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTester.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/test/VespaModelTester.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.model.test;
import com.google.common.collect.ImmutableList;
+import com.yahoo.cloud.config.ConfigserverConfig;
import com.yahoo.config.application.api.ApplicationPackage;
import com.yahoo.config.model.ConfigModelRegistry;
import com.yahoo.config.model.NullConfigModelRegistry;
@@ -46,6 +47,7 @@ public class VespaModelTester {
private boolean hosted = true;
private Map<String, Collection<Host>> hostsByFlavor = new HashMap<>();
private ApplicationId applicationId = ApplicationId.defaultId();
+ private boolean useDedicatedNodeForLogserver = false;
public VespaModelTester() {
this(new NullConfigModelRegistry());
@@ -92,6 +94,10 @@ public class VespaModelTester {
applicationId = ApplicationId.from(tenant, applicationName, instanceName);
}
+ public void useDedicatedNodeForLogserver(boolean useDedicatedNodeForLogserver) {
+ this.useDedicatedNodeForLogserver = useDedicatedNodeForLogserver;
+ }
+
/** Creates a model which uses 0 as start index and fails on out of capacity */
public VespaModel createModel(String services, String ... retiredHostNames) {
return createModel(Zone.defaultZone(), services, true, retiredHostNames);
@@ -131,6 +137,7 @@ public class VespaModelTester {
DeployProperties properties = new DeployProperties.Builder()
.hostedVespa(hosted)
.applicationId(applicationId)
+ .useDedicatedNodeForLogserver(useDedicatedNodeForLogserver)
.build();
DeployState deployState = new DeployState.Builder()
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithFilePkg.java b/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithFilePkg.java
index 3c9618ceccd..8147d2e00ca 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithFilePkg.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithFilePkg.java
@@ -10,6 +10,7 @@ import com.yahoo.config.model.api.ValidationParameters.FailOnIncompatibleChange;
import com.yahoo.config.model.api.ValidationParameters.IgnoreValidationErrors;
import com.yahoo.config.model.application.provider.*;
import com.yahoo.config.model.deploy.DeployState;
+import com.yahoo.vespa.config.VespaVersion;
import com.yahoo.vespa.model.VespaModel;
import com.yahoo.vespa.model.application.validation.Validation;
@@ -50,7 +51,7 @@ public class VespaModelCreatorWithFilePkg {
public void validate() throws IOException {
ApplicationPackageXmlFilesValidator validator =
- ApplicationPackageXmlFilesValidator.create(applicationPkg.getAppDir(), new Version(6));
+ ApplicationPackageXmlFilesValidator.create(applicationPkg.getAppDir(), new Version(VespaVersion.major));
validator.checkApplication();
validator.checkIncludedDirs(applicationPkg);
}