summaryrefslogtreecommitdiffstats
path: root/config-model/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test')
-rw-r--r--config-model/src/test/examples/simple.sd2
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java44
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java6
-rw-r--r--config-model/src/test/java/com/yahoo/document/test/SDDocumentTypeTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/document/test/SDFieldTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/ArraysWeightedSetsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/IncorrectRankingExpressionFileRefTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/IncorrectSummaryTypesTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/IndexingParsingTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/MultipleSummariesTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/NameFieldCheckTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/OutsideTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SearchDefinitionTestCase.java (renamed from config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java)2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SearchDefinitionsParsingTestCase.java (renamed from config-model/src/test/java/com/yahoo/searchdefinition/SchemaParsingTestCase.java)2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java3
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java2
-rwxr-xr-xconfig-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/AbstractExportingTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/AttributeListTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/CasingTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/DeriverTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/EmptyRankProfileTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/NativeRankTypeDefinitionsTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/SearchOrdererTestCase.java46
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryMapTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/TypeConversionTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributesExactMatchTestCase.java4
-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/ImplicitSearchFieldsTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFieldsTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/NGramTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankModifierTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankPropertyVariablesTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/documentmodel/AbstractReferenceFieldTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/documentmodel/DocumentModelBuilderTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/ValidationTester.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexedSearchClusterChangeValidatorTest.java12
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StreamingSearchClusterChangeValidatorTest.java12
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java8
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java20
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java33
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java8
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/StorageContentTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/utils/ApplicationPackageBuilder.java8
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java30
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/utils/SearchDefinitionBuilder.java (renamed from config-model/src/test/java/com/yahoo/vespa/model/content/utils/SchemaBuilder.java)12
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java16
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchClusterTest.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/test/utils/ApplicationPackageUtils.java8
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithMockPkg.java4
78 files changed, 220 insertions, 232 deletions
diff --git a/config-model/src/test/examples/simple.sd b/config-model/src/test/examples/simple.sd
index a8c801b1421..e61b64dc0ed 100644
--- a/config-model/src/test/examples/simple.sd
+++ b/config-model/src/test/examples/simple.sd
@@ -3,7 +3,7 @@
# You can get a reasonable configuration by only configuring
# a document
# ...this has become less and less simple over time actually
-schema simple {
+search simple {
document simple {
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 fe82f2406f2..cb1577417b4 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
@@ -20,7 +20,7 @@ import com.yahoo.searchdefinition.DocumentOnlySearch;
import com.yahoo.vespa.config.ConfigDefinition;
import com.yahoo.vespa.config.ConfigDefinitionKey;
import com.yahoo.vespa.model.VespaModel;
-import com.yahoo.vespa.model.search.NamedSchema;
+import com.yahoo.vespa.model.search.SearchDefinition;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
@@ -31,6 +31,7 @@ import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -59,9 +60,9 @@ public class ApplicationDeployTest {
public void testVespaModel() throws SAXException, IOException {
ApplicationPackageTester tester = ApplicationPackageTester.create(TESTDIR + "app1");
VespaModel model = new VespaModel(tester.app());
- List<NamedSchema> schemas = tester.getSchemas();
- assertEquals(schemas.size(), 5);
- for (NamedSchema searchDefinition : schemas) {
+ List<SearchDefinition> searchDefinitions = tester.getSearchDefinitions();
+ assertEquals(searchDefinitions.size(), 5);
+ for (SearchDefinition searchDefinition : searchDefinitions) {
Search s = searchDefinition.getSearch();
switch (s.getName()) {
case "music":
@@ -71,18 +72,21 @@ public class ApplicationDeployTest {
break;
case "product":
assertTrue(s instanceof DocumentOnlySearch);
- assertEquals(DataType.STRING, s.getDocument().getField("title").getDataType());
+ assertEquals(s.getDocument().getField("title").getDataType(), DataType.STRING);
break;
default:
fail();
}
}
- assertEquals(Set.of(new File(TESTSDDIR + "laptop.sd"),
- new File(TESTSDDIR + "music.sd"),
- new File(TESTSDDIR + "pc.sd"),
- new File(TESTSDDIR + "product.sd"),
- new File(TESTSDDIR + "sock.sd")),
- new HashSet<>(tester.app().getSearchDefinitionFiles()));
+ File[] truth = new File[]{new File(TESTSDDIR + "laptop.sd"),
+ new File(TESTSDDIR + "music.sd"),
+ new File(TESTSDDIR + "pc.sd"),
+ new File(TESTSDDIR + "product.sd"),
+ new File(TESTSDDIR + "sock.sd")};
+ Arrays.sort(truth);
+ List<File> appSdFiles = tester.app().getSearchDefinitionFiles();
+ Collections.sort(appSdFiles);
+ assertEquals(appSdFiles, Arrays.asList(truth));
List<FilesApplicationPackage.Component> components = tester.app().getComponents();
assertEquals(1, components.size());
@@ -99,7 +103,7 @@ public class ApplicationDeployTest {
// Check that getFilename works
ArrayList<String> sdFileNames = new ArrayList<>();
- for (NamedSchema sd : schemas)
+ for (SearchDefinition sd : searchDefinitions)
sdFileNames.add(sd.getFilename());
Collections.sort(sdFileNames);
assertEquals("laptop.sd", sdFileNames.get(0));
@@ -186,11 +190,11 @@ public class ApplicationDeployTest {
File tmpDir = tmpFolder.getRoot();
IOUtils.copyDirectory(new File(TESTDIR, "app1"), tmpDir);
ApplicationPackageTester tester = ApplicationPackageTester.create(tmpDir.getAbsolutePath());
- assertEquals(5, tester.getSchemas().size());
- File sdDir = new File(tmpDir, "schemas");
+ assertEquals(5, tester.getSearchDefinitions().size());
+ File sdDir = new File(tmpDir, "searchdefinitions");
File sd = new File(sdDir, "testfoo.sd");
IOUtils.writeFile(sd, "search testfoo { document testfoo { field bar type string { } } }", false);
- assertEquals(6, tester.getSchemas().size());
+ assertEquals(6, tester.getSearchDefinitions().size());
}
@Test
@@ -296,16 +300,6 @@ public class ApplicationDeployTest {
@Test
public void testGetJarEntryName() {
- JarEntry e = new JarEntry("/schemas/foo.sd");
- assertEquals(ApplicationPackage.getFileName(e), "foo.sd");
- e = new JarEntry("bar");
- assertEquals(ApplicationPackage.getFileName(e), "bar");
- e = new JarEntry("");
- assertEquals(ApplicationPackage.getFileName(e), "");
- }
-
- @Test
- public void testGetJarEntryNameForLegacyPath() {
JarEntry e = new JarEntry("/searchdefinitions/foo.sd");
assertEquals(ApplicationPackage.getFileName(e), "foo.sd");
e = new JarEntry("bar");
diff --git a/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java b/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java
index 8e7d5aadb36..87b6efa83d6 100644
--- a/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java
+++ b/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java
@@ -5,7 +5,7 @@ import com.yahoo.component.Version;
import com.yahoo.config.model.application.provider.ApplicationPackageXmlFilesValidator;
import com.yahoo.config.model.application.provider.FilesApplicationPackage;
import com.yahoo.config.model.deploy.DeployState;
-import com.yahoo.vespa.model.search.NamedSchema;
+import com.yahoo.vespa.model.search.SearchDefinition;
import java.io.File;
import java.io.IOException;
@@ -39,8 +39,8 @@ public class ApplicationPackageTester {
public FilesApplicationPackage app() { return applicationPackage; }
- public List<NamedSchema> getSchemas() {
- return new DeployState.Builder().applicationPackage(app()).build().getSchemas();
+ public List<SearchDefinition> getSearchDefinitions() {
+ return new DeployState.Builder().applicationPackage(app()).build().getSearchDefinitions();
}
public static ApplicationPackageTester create(String applicationPackageDir) {
diff --git a/config-model/src/test/java/com/yahoo/document/test/SDDocumentTypeTestCase.java b/config-model/src/test/java/com/yahoo/document/test/SDDocumentTypeTestCase.java
index 127c121197b..94602d5201a 100644
--- a/config-model/src/test/java/com/yahoo/document/test/SDDocumentTypeTestCase.java
+++ b/config-model/src/test/java/com/yahoo/document/test/SDDocumentTypeTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.document.test;
import com.yahoo.document.DataType;
import com.yahoo.document.DataTypeName;
import com.yahoo.documentmodel.VespaDocumentType;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
import org.junit.Test;
@@ -17,7 +17,7 @@ import static org.junit.Assert.*;
* @author Thomas Gundersen
* @author bratseth
*/
-public class SDDocumentTypeTestCase extends SchemaTestCase {
+public class SDDocumentTypeTestCase extends SearchDefinitionTestCase {
// Verify that we can register and retrieve fields.
@Test
diff --git a/config-model/src/test/java/com/yahoo/document/test/SDFieldTestCase.java b/config-model/src/test/java/com/yahoo/document/test/SDFieldTestCase.java
index b3109c3c2e4..7dcbd92655b 100644
--- a/config-model/src/test/java/com/yahoo/document/test/SDFieldTestCase.java
+++ b/config-model/src/test/java/com/yahoo/document/test/SDFieldTestCase.java
@@ -2,7 +2,7 @@
package com.yahoo.document.test;
import com.yahoo.document.DataType;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import org.junit.Test;
@@ -11,7 +11,7 @@ import static org.junit.Assert.fail;
/**
* @author Thomas Gundersen
*/
-public class SDFieldTestCase extends SchemaTestCase {
+public class SDFieldTestCase extends SearchDefinitionTestCase {
@Test
public void testIdSettingConflict() {
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 6a40778c9c4..846166ae93c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/ArraysTestCase.java
@@ -18,7 +18,7 @@ import static org.junit.Assert.assertTrue;
*
* @author bratseth
*/
-public class ArraysTestCase extends SchemaTestCase {
+public class ArraysTestCase extends SearchDefinitionTestCase {
@Test
public void testArrayImporting() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/ArraysWeightedSetsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/ArraysWeightedSetsTestCase.java
index af1e061b7fa..cfd02c22b89 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/ArraysWeightedSetsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/ArraysWeightedSetsTestCase.java
@@ -16,7 +16,7 @@ import static org.junit.Assert.assertTrue;
*
* @author Einar M R Rosenvinge
*/
-public class ArraysWeightedSetsTestCase extends SchemaTestCase {
+public class ArraysWeightedSetsTestCase extends SearchDefinitionTestCase {
@Test
public void testArrayWeightedSetsImporting() throws java.io.IOException, com.yahoo.searchdefinition.parser.ParseException {
Search search = SearchBuilder.buildFromFile("src/test/examples/arraysweightedsets.sd");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java
index 83cad4cf266..084cbcfdfc0 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java
@@ -25,7 +25,7 @@ import static org.junit.Assert.*;
*
* @author bratseth
*/
-public class AttributeSettingsTestCase extends SchemaTestCase {
+public class AttributeSettingsTestCase extends SearchDefinitionTestCase {
@Rule
public final ExpectedException exceptionRule = ExpectedException.none();
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java
index 3bb464c5fa5..8ccb1ed969a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/CommentTestCase.java
@@ -14,7 +14,7 @@ import static org.junit.Assert.assertEquals;
*
* @author bratseth
*/
-public class CommentTestCase extends SchemaTestCase {
+public class CommentTestCase extends SearchDefinitionTestCase {
@Test
public void testComments() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java
index 1c7b3e19663..be3bae05c5b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java
@@ -19,7 +19,7 @@ import static org.junit.Assert.assertSame;
/**
* @author Einar M R Rosenvinge
*/
-public class FieldOfTypeDocumentTestCase extends SchemaTestCase {
+public class FieldOfTypeDocumentTestCase extends SearchDefinitionTestCase {
@Test
public void testDocument() throws IOException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectRankingExpressionFileRefTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectRankingExpressionFileRefTestCase.java
index 4453f327bb4..519828497fe 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectRankingExpressionFileRefTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectRankingExpressionFileRefTestCase.java
@@ -18,7 +18,7 @@ import static org.junit.Assert.fail;
/**
* @author bratseth
*/
-public class IncorrectRankingExpressionFileRefTestCase extends SchemaTestCase {
+public class IncorrectRankingExpressionFileRefTestCase extends SearchDefinitionTestCase {
@Test
public void testIncorrectRef() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectSummaryTypesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectSummaryTypesTestCase.java
index 91ab5e2b5df..c145c0e5634 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectSummaryTypesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/IncorrectSummaryTypesTestCase.java
@@ -11,7 +11,7 @@ import static org.junit.Assert.fail;
*
* @author bratseth
*/
-public class IncorrectSummaryTypesTestCase extends SchemaTestCase {
+public class IncorrectSummaryTypesTestCase extends SearchDefinitionTestCase {
@Test
public void testImportingIncorrect() throws ParseException {
try {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java
index f992d5ee0ba..2cfb542d06b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java
@@ -15,7 +15,7 @@ import static org.junit.Assert.assertEquals;
*
* @author bratseth
*/
-public class IndexSettingsTestCase extends SchemaTestCase {
+public class IndexSettingsTestCase extends SearchDefinitionTestCase {
@Test
public void testStemmingSettings() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/IndexingParsingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/IndexingParsingTestCase.java
index 70119ad42f9..21ba3a5e80a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/IndexingParsingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/IndexingParsingTestCase.java
@@ -11,7 +11,7 @@ import static org.junit.Assert.assertNotNull;
*
* @author frodelu
*/
-public class IndexingParsingTestCase extends SchemaTestCase {
+public class IndexingParsingTestCase extends SearchDefinitionTestCase {
@Test
public void requireThatIndexingExpressionsCanBeParsed() throws Exception {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/MultipleSummariesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/MultipleSummariesTestCase.java
index 5721dbf06e8..df9f5778614 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/MultipleSummariesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/MultipleSummariesTestCase.java
@@ -11,7 +11,7 @@ import java.io.IOException;
*
* @author bratseth
*/
-public class MultipleSummariesTestCase extends SchemaTestCase {
+public class MultipleSummariesTestCase extends SearchDefinitionTestCase {
@Test
public void testArrayImporting() throws IOException, ParseException {
SearchBuilder.buildFromFile("src/test/examples/multiplesummaries.sd");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/NameFieldCheckTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/NameFieldCheckTestCase.java
index 47b6905c677..d2360453976 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/NameFieldCheckTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/NameFieldCheckTestCase.java
@@ -14,7 +14,7 @@ import static org.junit.Assert.fail;
*
* @author Lars Christian Jensen
*/
-public class NameFieldCheckTestCase extends SchemaTestCase {
+public class NameFieldCheckTestCase extends SearchDefinitionTestCase {
@Test
public void testNameField() {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/OutsideTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/OutsideTestCase.java
index 64527e7f7a5..5ac37bf0a3a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/OutsideTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/OutsideTestCase.java
@@ -13,7 +13,7 @@ import static org.junit.Assert.assertTrue;
*
* @author bratseth
*/
-public class OutsideTestCase extends SchemaTestCase {
+public class OutsideTestCase extends SearchDefinitionTestCase {
@Test
public void testOutsideIndex() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
index e2f2c1fd407..5ba508e3ef3 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
@@ -34,7 +34,7 @@ import static org.junit.Assert.assertTrue;
*
* @author bratseth
*/
-public class RankProfileTestCase extends SchemaTestCase {
+public class RankProfileTestCase extends SearchDefinitionTestCase {
@Test
public void testRankProfileInheritance() {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java
index 3fe2861de0c..f4666f7fb3b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java
@@ -13,7 +13,7 @@ import static org.junit.Assert.assertEquals;
/**
* @author bratseth
*/
-public class RankPropertiesTestCase extends SchemaTestCase {
+public class RankPropertiesTestCase extends SearchDefinitionTestCase {
@Test
public void testRankPropertyInheritance() throws ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java
index d84d967a184..51508414205 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java
@@ -17,7 +17,7 @@ import static org.junit.Assert.*;
/**
* @author bratseth
*/
-public class RankingExpressionConstantsTestCase extends SchemaTestCase {
+public class RankingExpressionConstantsTestCase extends SearchDefinitionTestCase {
@Test
public void testConstants() throws ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java
index e0679eb5175..58e62353e5c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java
@@ -17,7 +17,7 @@ import static org.junit.Assert.assertTrue;
/**
* @author bratseth
*/
-public class RankingExpressionInliningTestCase extends SchemaTestCase {
+public class RankingExpressionInliningTestCase extends SearchDefinitionTestCase {
@Test
public void testFunctionInliningPreserveArithmeticOrdering() throws ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java
index 5c1134f928c..3d842be129f 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java
@@ -19,7 +19,7 @@ import static org.junit.Assert.assertEquals;
/**
* @author lesters
*/
-public class RankingExpressionShadowingTestCase extends SchemaTestCase {
+public class RankingExpressionShadowingTestCase extends SearchDefinitionTestCase {
@Test
public void testBasicFunctionShadowing() throws ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
index c1fe5e42dfa..c5027af2a0c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
@@ -15,7 +15,7 @@ import static org.junit.Assert.fail;
/**
* @author bratseth
*/
-public class RankingExpressionValidationTestCase extends SchemaTestCase {
+public class RankingExpressionValidationTestCase extends SearchDefinitionTestCase {
@Test
public void testInvalidExpressionProducesException() throws ParseException {
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 1a939d71937..5a5fc1cc312 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/ReservedWordsAsFieldNamesTestCase.java
@@ -11,7 +11,7 @@ import static org.junit.Assert.assertNotNull;
/**
* @author bratseth
*/
-public class ReservedWordsAsFieldNamesTestCase extends SchemaTestCase {
+public class ReservedWordsAsFieldNamesTestCase extends SearchDefinitionTestCase {
@Test
public void testIt() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SearchDefinitionTestCase.java
index 7f3ea7d14bc..ba6da8792fa 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SearchDefinitionTestCase.java
@@ -10,7 +10,7 @@ import java.io.IOException;
import static helpers.CompareConfigTestHelper.assertSerializedConfigEquals;
import static helpers.CompareConfigTestHelper.assertSerializedConfigFileEquals;
-public abstract class SchemaTestCase {
+public abstract class SearchDefinitionTestCase {
protected static void assertConfigFile(String filename, String cfg) throws IOException {
assertSerializedConfigFileEquals(filename, cfg);
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaParsingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SearchDefinitionsParsingTestCase.java
index 0ae39b7f8b6..fd4bb393c49 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaParsingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SearchDefinitionsParsingTestCase.java
@@ -15,7 +15,7 @@ import static org.junit.Assert.*;
*
* @author hmusum
*/
-public class SchemaParsingTestCase extends SchemaTestCase {
+public class SearchDefinitionsParsingTestCase extends SearchDefinitionTestCase {
@Test
public void requireThatIndexingExpressionsCanBeParsed() throws Exception {
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 018703153ac..66ff1877994 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
@@ -3,6 +3,7 @@ package com.yahoo.searchdefinition;
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.Attribute;
import com.yahoo.searchdefinition.document.RankType;
@@ -30,7 +31,7 @@ import static org.junit.Assert.fail;
*
* @author bratseth
*/
-public class SearchImporterTestCase extends SchemaTestCase {
+public class SearchImporterTestCase extends SearchDefinitionTestCase {
@Test
@SuppressWarnings("deprecation")
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 e5b8ec85d75..9b27d338ced 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/StemmingSettingTestCase.java
@@ -16,7 +16,7 @@ import static org.junit.Assert.assertNull;
*
* @author bratseth
*/
-public class StemmingSettingTestCase extends SchemaTestCase {
+public class StemmingSettingTestCase extends SearchDefinitionTestCase {
@Test
public void testStemmingSettings() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
index 77df5b391dc..001ad64e2da 100755
--- a/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/StructTestCase.java
@@ -14,7 +14,7 @@ import static org.junit.Assert.fail;
*
* @author bratseth
*/
-public class StructTestCase extends SchemaTestCase {
+public class StructTestCase extends SearchDefinitionTestCase {
@Test
public void testStruct() throws IOException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/AbstractExportingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/AbstractExportingTestCase.java
index a345cabe909..7e0eb01f611 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/AbstractExportingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/AbstractExportingTestCase.java
@@ -7,7 +7,7 @@ import com.yahoo.document.DocumenttypesConfig;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
import com.yahoo.vespa.configmodel.producers.DocumentManager;
@@ -21,7 +21,7 @@ import java.io.IOException;
*
* @author bratseth
*/
-public abstract class AbstractExportingTestCase extends SchemaTestCase {
+public abstract class AbstractExportingTestCase extends SearchDefinitionTestCase {
private static final String tempDir = "temp/";
private static final String searchDefRoot = "src/test/derived/";
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/AttributeListTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/AttributeListTestCase.java
index 80a92a5b5ec..79ec3027c20 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/AttributeListTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/AttributeListTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.derived;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.Attribute;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertFalse;
*
* @author bratseth
*/
-public class AttributeListTestCase extends SchemaTestCase {
+public class AttributeListTestCase extends SearchDefinitionTestCase {
@Test
public void testDeriving() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/CasingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/CasingTestCase.java
index 07762fc6937..b47a268d95a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/CasingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/CasingTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.derived;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -16,7 +16,7 @@ import static org.junit.Assert.assertEquals;
*
* @author vegardh
*/
-public class CasingTestCase extends SchemaTestCase {
+public class CasingTestCase extends SearchDefinitionTestCase {
@Test
public void testCasing() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/DeriverTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/DeriverTestCase.java
index 8b09a4efd57..1209da6d64b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/DeriverTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/DeriverTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.searchdefinition.derived;
import com.yahoo.document.DataType;
import com.yahoo.document.DocumentTypeManager;
import com.yahoo.document.config.DocumentmanagerConfig;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import org.junit.Test;
import java.util.List;
@@ -16,7 +16,7 @@ import static org.junit.Assert.assertEquals;
*
* @author bratseth
*/
-public class DeriverTestCase extends SchemaTestCase {
+public class DeriverTestCase extends SearchDefinitionTestCase {
@Test
public void testDeriveDocManager() {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/EmptyRankProfileTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/EmptyRankProfileTestCase.java
index 47862a2611b..aaac1631722 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/EmptyRankProfileTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/EmptyRankProfileTestCase.java
@@ -6,7 +6,7 @@ import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
@@ -17,7 +17,7 @@ import org.junit.Test;
*
* @author bratseth
*/
-public class EmptyRankProfileTestCase extends SchemaTestCase {
+public class EmptyRankProfileTestCase extends SearchDefinitionTestCase {
@Test
public void testDeriving() {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/NativeRankTypeDefinitionsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/NativeRankTypeDefinitionsTestCase.java
index 69c247b94d4..c8ba5168e1c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/NativeRankTypeDefinitionsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/NativeRankTypeDefinitionsTestCase.java
@@ -1,7 +1,7 @@
// 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.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.RankType;
import org.junit.Test;
@@ -14,7 +14,7 @@ import static org.junit.Assert.*;
*
* @author geirst
*/
-public class NativeRankTypeDefinitionsTestCase extends SchemaTestCase {
+public class NativeRankTypeDefinitionsTestCase extends SearchDefinitionTestCase {
@Test
public void testTables() {
assertEquals(NativeTable.Type.FIRST_OCCURRENCE.getName(), "firstOccurrenceTable");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SearchOrdererTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SearchOrdererTestCase.java
index 0c677456a87..b770024ebf1 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SearchOrdererTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SearchOrdererTestCase.java
@@ -6,7 +6,7 @@ import com.yahoo.document.TemporaryStructuredDataType;
import com.yahoo.searchdefinition.DocumentReference;
import com.yahoo.searchdefinition.DocumentReferences;
import com.yahoo.searchdefinition.Search;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.document.TemporarySDField;
@@ -26,47 +26,47 @@ import static org.junit.Assert.assertEquals;
* @author bratseth
* @author bjorncs
*/
-public class SearchOrdererTestCase extends SchemaTestCase {
+public class SearchOrdererTestCase extends SearchDefinitionTestCase {
- private static Map<String, Search> createSchemas() {
- Map<String, Search> schemas = new HashMap<>();
+ private static Map<String, Search> createSearchDefinitions() {
+ Map<String, Search> searchDefinitions = new HashMap<>();
- Search grandParent = createSchema("grandParent", schemas);
+ Search grandParent = createSearchDefinition("grandParent", searchDefinitions);
- Search mother = createSchema("mother", schemas);
+ Search mother = createSearchDefinition("mother", searchDefinitions);
inherit(mother, grandParent);
- Search father = createSchema("father", schemas);
+ Search father = createSearchDefinition("father", searchDefinitions);
inherit(father, grandParent);
createDocumentReference(father, mother, "wife_ref");
- Search daugther = createSchema("daughter", schemas);
+ Search daugther = createSearchDefinition("daughter", searchDefinitions);
inherit(daugther, father);
inherit(daugther, mother);
- Search son = createSchema("son", schemas);
+ Search son = createSearchDefinition("son", searchDefinitions);
inherit(son, father);
inherit(son, mother);
- Search product = createSchema("product", schemas);
+ Search product = createSearchDefinition("product", searchDefinitions);
- Search pc = createSchema("pc", schemas);
+ Search pc = createSearchDefinition("pc", searchDefinitions);
inherit(pc, product);
- Search pcAccessory = createSchema("accessory-pc", schemas);
+ Search pcAccessory = createSearchDefinition("accessory-pc", searchDefinitions);
inherit(pcAccessory, product);
createDocumentReference(pcAccessory, pc, "pc_ref");
- createSchema("alone", schemas);
+ createSearchDefinition("alone", searchDefinitions);
- return schemas;
+ return searchDefinitions;
}
- private static Search createSchema(String name, Map<String, Search> schemas) {
+ private static Search createSearchDefinition(String name, Map<String, Search> searchDefinitions) {
Search search = new Search(name, null);
SDDocumentType document = new SDDocumentType(name);
document.setDocumentReferences(new DocumentReferences(emptyMap()));
search.addDocument(document);
- schemas.put(search.getName(), search);
+ searchDefinitions.put(search.getName(), search);
return search;
}
@@ -75,13 +75,13 @@ public class SearchOrdererTestCase extends SchemaTestCase {
}
private static void assertOrder(List<String> expectedSearchOrder, List<String> inputNames) {
- Map<String, Search> schemas = createSchemas();
- List<Search> inputSchemas = inputNames.stream()
- .map(schemas::get)
+ Map<String, Search> searchDefinitions = createSearchDefinitions();
+ List<Search> inputSearchDefinitions = inputNames.stream()
+ .map(searchDefinitions::get)
.map(Objects::requireNonNull)
.collect(toList());
List<String> actualSearchOrder = new SearchOrderer()
- .order(inputSchemas)
+ .order(inputSearchDefinitions)
.stream()
.map(Search::getName)
.collect(toList());
@@ -104,37 +104,31 @@ public class SearchOrdererTestCase extends SchemaTestCase {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "son"),
Arrays.asList("grandParent", "mother", "father", "daughter", "son", "product", "pc", "alone"));
}
-
@Test
public void testOneLevelReordering() {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "son"),
Arrays.asList("grandParent", "daughter", "son", "mother", "father", "pc", "product", "alone"));
}
-
@Test
public void testMultiLevelReordering() {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "son"),
Arrays.asList("daughter", "son", "mother", "father", "grandParent", "pc", "product", "alone"));
}
-
@Test
public void testAloneIsKeptInPlaceWithMultiLevelReordering() {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "son"),
Arrays.asList("alone", "daughter", "son", "mother", "father", "grandParent", "pc", "product"));
}
-
@Test
public void testPartialMultiLevelReordering() {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "son"),
Arrays.asList("daughter", "grandParent", "mother", "son", "father", "product", "pc", "alone"));
}
-
@Test
public void testMultilevelReorderingAccrossHierarchies() {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "son"),
Arrays.asList("daughter", "pc", "son", "mother", "grandParent", "father", "product", "alone"));
}
-
@Test
public void referees_are_ordered_before_referrer() {
assertOrder(Arrays.asList("alone", "grandParent", "mother", "father", "daughter", "product", "pc", "accessory-pc", "son"),
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryMapTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryMapTestCase.java
index 07d7405b1db..f85f9994e04 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryMapTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryMapTestCase.java
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertTrue;
*
* @author bratseth
*/
-public class SummaryMapTestCase extends SchemaTestCase {
+public class SummaryMapTestCase extends SearchDefinitionTestCase {
@Test
public void testDeriving() throws IOException, ParseException {
Search search = SearchBuilder.buildFromFile("src/test/examples/simple.sd");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryTestCase.java
index afbc9f52f6b..b82620b1cf5 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SummaryTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.searchdefinition.derived;
import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertNull;
*
* @author bratseth
*/
-public class SummaryTestCase extends SchemaTestCase {
+public class SummaryTestCase extends SearchDefinitionTestCase {
@Test
public void testDeriving() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/TypeConversionTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/TypeConversionTestCase.java
index c03e915aa8b..24575df8c91 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/TypeConversionTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/TypeConversionTestCase.java
@@ -6,7 +6,7 @@ import com.yahoo.document.DataType;
import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.processing.Processing;
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertFalse;
*
* @author bratseth
*/
-public class TypeConversionTestCase extends SchemaTestCase {
+public class TypeConversionTestCase extends SearchDefinitionTestCase {
/** Tests that exact-string stuff is not spilled over to the default index */
@Test
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributesExactMatchTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributesExactMatchTestCase.java
index 35ce4dff730..7236ccbc117 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributesExactMatchTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/AttributesExactMatchTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.Matching;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -17,7 +17,7 @@ import static org.junit.Assert.assertFalse;
* @author vegardh
*
*/
-public class AttributesExactMatchTestCase extends SchemaTestCase {
+public class AttributesExactMatchTestCase extends SearchDefinitionTestCase {
@Test
public void testAttributesExactMatch() throws IOException, ParseException {
Search search = SearchBuilder.buildFromFile("src/test/examples/attributesexactmatch.sd");
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 9a4357c5d65..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
@@ -5,7 +5,7 @@ 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.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import org.junit.Test;
@@ -18,7 +18,7 @@ import static org.junit.Assert.fail;
/**
* @author Mathias Mølster Lidal
*/
-public class BoldingTestCase extends SchemaTestCase {
+public class BoldingTestCase extends SearchDefinitionTestCase {
@Test
public void testBoldingNonString() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java
index 809ccdb3a3a..620cee49ac4 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java
@@ -6,7 +6,7 @@ import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.derived.DerivedConfiguration;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.parser.ParseException;
@@ -18,7 +18,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-public class ImplicitSearchFieldsTestCase extends SchemaTestCase {
+public class ImplicitSearchFieldsTestCase extends SearchDefinitionTestCase {
@Test
public void testRequireThatExtraFieldsAreIncluded() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java
index c9ea57c5b9b..f2d81414b5a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.document.*;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.parser.ParseException;
@@ -13,7 +13,7 @@ import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.*;
-public class ImplicitStructTypesTestCase extends SchemaTestCase {
+public class ImplicitStructTypesTestCase extends SearchDefinitionTestCase {
@Test
public void testRequireThatImplicitStructsAreCreated() throws IOException, ParseException {
Search search = SearchBuilder.buildFromFile("src/test/examples/nextgen/toggleon.sd");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFieldsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFieldsTestCase.java
index ae00e4f3079..7acbf67772a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFieldsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummaryFieldsTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.documentmodel.DocumentSummary;
import org.junit.Test;
@@ -13,7 +13,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-public class ImplicitSummaryFieldsTestCase extends SchemaTestCase {
+public class ImplicitSummaryFieldsTestCase extends SearchDefinitionTestCase {
@Test
public void testRequireThatImplicitFieldsAreCreated() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java
index 7863c544b60..d313c2391fd 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java
@@ -7,7 +7,7 @@ import com.yahoo.searchdefinition.Index;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.BooleanIndexDefinition;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertEquals;
/**
* @author Simon Thoresen Hult
*/
-public class IndexingScriptRewriterTestCase extends SchemaTestCase {
+public class IndexingScriptRewriterTestCase extends SearchDefinitionTestCase {
@Test
public void testSetLanguageRewriting() {
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 fcf1c39f5b4..cac50354dc2 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
@@ -5,7 +5,7 @@ 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.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue;
/**
* @author baldersheim
*/
-public class IntegerIndex2AttributeTestCase extends SchemaTestCase {
+public class IntegerIndex2AttributeTestCase extends SearchDefinitionTestCase {
@Test
public void testIntegerIndex2Attribute() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/NGramTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/NGramTestCase.java
index c792d3bf40b..385d1df90ad 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/NGramTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/NGramTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.document.Matching;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.document.Stemming;
@@ -21,7 +21,7 @@ import static org.junit.Assert.fail;
/**
* @author bratseth
*/
-public class NGramTestCase extends SchemaTestCase {
+public class NGramTestCase extends SearchDefinitionTestCase {
@Test
public void testNGram() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankModifierTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankModifierTestCase.java
index 4ab56f809c9..0d6334a5223 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankModifierTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankModifierTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -14,7 +14,7 @@ import java.io.IOException;
* @author vegardh
*
*/
-public class RankModifierTestCase extends SchemaTestCase {
+public class RankModifierTestCase extends SearchDefinitionTestCase {
@Test
public void testLiteral() throws IOException, ParseException {
Search search = SearchBuilder.buildFromFile("src/test/examples/rankmodifier/literal.sd");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankPropertyVariablesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankPropertyVariablesTestCase.java
index 502fc4472bc..d740884d3e5 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankPropertyVariablesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankPropertyVariablesTestCase.java
@@ -7,7 +7,7 @@ import com.yahoo.searchdefinition.RankProfile.RankProperty;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -16,7 +16,7 @@ import java.util.List;
import static org.junit.Assert.fail;
-public class RankPropertyVariablesTestCase extends SchemaTestCase {
+public class RankPropertyVariablesTestCase extends SearchDefinitionTestCase {
@Test
public void testRankPropVariables() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java
index b3eda9b7e13..96fa59a77cc 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java
@@ -19,7 +19,7 @@ import java.util.Map;
import static org.junit.Assert.assertEquals;
-public class RankingExpressionsTestCase extends SchemaTestCase {
+public class RankingExpressionsTestCase extends SearchDefinitionTestCase {
@Test
public void testFunctions() throws IOException, ParseException {
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 ca8744a07bb..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
@@ -6,7 +6,7 @@ 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.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import org.junit.Test;
@@ -16,7 +16,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-public class SummaryFieldsMustHaveValidSourceTestCase extends SchemaTestCase {
+public class SummaryFieldsMustHaveValidSourceTestCase extends SearchDefinitionTestCase {
@Test
public void requireThatInvalidSourceIsCaught() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java
index 8308b638497..f90320ad686 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java
@@ -13,7 +13,7 @@ import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.derived.AttributeFields;
import com.yahoo.searchdefinition.derived.RawRankProfile;
import com.yahoo.searchdefinition.parser.ParseException;
@@ -25,7 +25,7 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-public class TensorTransformTestCase extends SchemaTestCase {
+public class TensorTransformTestCase extends SearchDefinitionTestCase {
@Test
public void requireThatNormalMaxAndMinAreNotReplaced() throws ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java
index 957b5c55889..ef6bc57223d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -12,7 +12,7 @@ import java.io.IOException;
import static org.junit.Assert.assertNotNull;
/** @author bratseth */
-public class WeightedSetSummaryToTestCase extends SchemaTestCase {
+public class WeightedSetSummaryToTestCase extends SearchDefinitionTestCase {
@Test
public void testRequireThatImplicitFieldsAreCreated() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/vespa/documentmodel/AbstractReferenceFieldTestCase.java b/config-model/src/test/java/com/yahoo/vespa/documentmodel/AbstractReferenceFieldTestCase.java
index 9144ad411b2..d0ee0523489 100644
--- a/config-model/src/test/java/com/yahoo/vespa/documentmodel/AbstractReferenceFieldTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/documentmodel/AbstractReferenceFieldTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.vespa.documentmodel;
import com.yahoo.document.DocumenttypesConfig;
import com.yahoo.document.config.DocumentmanagerConfig;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.vespa.configmodel.producers.DocumentManager;
import com.yahoo.vespa.configmodel.producers.DocumentTypes;
@@ -12,7 +12,7 @@ import java.io.IOException;
/**
* Utility functions for testing generated configs for reference/imported fields.
*/
-public abstract class AbstractReferenceFieldTestCase extends SchemaTestCase {
+public abstract class AbstractReferenceFieldTestCase extends SearchDefinitionTestCase {
private static String TEST_FOLDER = "src/test/configmodel/types/references/";
diff --git a/config-model/src/test/java/com/yahoo/vespa/documentmodel/DocumentModelBuilderTestCase.java b/config-model/src/test/java/com/yahoo/vespa/documentmodel/DocumentModelBuilderTestCase.java
index 91152648b10..f5034d0530b 100644
--- a/config-model/src/test/java/com/yahoo/vespa/documentmodel/DocumentModelBuilderTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/documentmodel/DocumentModelBuilderTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.vespa.documentmodel;
import com.yahoo.document.DocumenttypesConfig;
import com.yahoo.document.config.DocumentmanagerConfig;
import com.yahoo.searchdefinition.SearchBuilder;
-import com.yahoo.searchdefinition.SchemaTestCase;
+import com.yahoo.searchdefinition.SearchDefinitionTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.configmodel.producers.DocumentManager;
import com.yahoo.vespa.configmodel.producers.DocumentTypes;
@@ -13,7 +13,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-public class DocumentModelBuilderTestCase extends SchemaTestCase {
+public class DocumentModelBuilderTestCase extends SearchDefinitionTestCase {
@Test
public void testDocumentManagerSimple() throws IOException, ParseException {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java
index 4b23a7e2e71..cd67e432b8f 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/admin/ClusterControllerTestCase.java
@@ -52,7 +52,7 @@ public class ClusterControllerTestCase extends DomBuilderTest {
@Before
public void setup() {
- sds = ApplicationPackageUtils.generateSchemas("type1", "type2");
+ sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2");
}
@Test
@@ -457,7 +457,7 @@ public class ClusterControllerTestCase extends DomBuilderTest {
private VespaModel createVespaModel(String servicesXml, boolean isHosted) throws IOException, SAXException {
ApplicationPackage applicationPackage = new MockApplicationPackage.Builder()
.withServices(servicesXml)
- .withSchemas(sds)
+ .withSearchDefinitions(sds)
.build();
// Need to create VespaModel to make deploy properties have effect
DeployLogger logger = new DeployLoggerStub();
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/ValidationTester.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/ValidationTester.java
index 09e4b377085..f7b6d7b25e1 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/ValidationTester.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/ValidationTester.java
@@ -65,7 +65,7 @@ public class ValidationTester {
Instant now = LocalDate.parse("2000-01-01", DateTimeFormatter.ISO_DATE).atStartOfDay().atZone(ZoneOffset.UTC).toInstant();
ApplicationPackage newApp = new MockApplicationPackage.Builder()
.withServices(services)
- .withSchemas(ImmutableList.of(MUSIC_SEARCHDEFINITION, BOOK_SEARCHDEFINITION))
+ .withSearchDefinitions(ImmutableList.of(MUSIC_SEARCHDEFINITION, BOOK_SEARCHDEFINITION))
.withValidationOverrides(validationOverrides)
.build();
VespaModelCreatorWithMockPkg newModelCreator = new VespaModelCreatorWithMockPkg(newApp);
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java
index 81b7f870a10..bb209e58e24 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigValueChangeValidatorTest.java
@@ -201,7 +201,7 @@ public class ConfigValueChangeValidatorTest {
" </engine>\n" +
" </content>\n" +
"</services>",
- createSchemas(docTypes)
+ createSearchDefinitions(docTypes)
).create();
}
@@ -213,7 +213,7 @@ public class ConfigValueChangeValidatorTest {
"</documents>";
}
- private static List<String> createSchemas(List<String> docTypes) {
+ private static List<String> createSearchDefinitions(List<String> docTypes) {
return docTypes.stream()
.map(type -> "search " + type + " { document " + type + " { } }")
.collect(Collectors.toList());
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexedSearchClusterChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexedSearchClusterChangeValidatorTest.java
index 80127ac6854..43ad1bc0e8a 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexedSearchClusterChangeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexedSearchClusterChangeValidatorTest.java
@@ -7,7 +7,7 @@ import com.yahoo.vespa.model.VespaModel;
import com.yahoo.config.application.api.ValidationOverrides;
import com.yahoo.vespa.model.content.utils.ApplicationPackageBuilder;
import com.yahoo.vespa.model.content.utils.ContentClusterBuilder;
-import com.yahoo.vespa.model.content.utils.SchemaBuilder;
+import com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder;
import org.junit.Test;
import java.time.Instant;
@@ -41,7 +41,7 @@ public class IndexedSearchClusterChangeValidatorTest {
public static VespaModel newOneDocModel(String sdContent) {
return new ApplicationPackageBuilder().
addCluster(new ContentClusterBuilder().name("foo").docTypes("d1")).
- addSchemas(new SchemaBuilder().
+ addSearchDefinition(new SearchDefinitionBuilder().
name("d1").content(sdContent).build()).buildCreator().create();
}
@@ -52,9 +52,9 @@ public class IndexedSearchClusterChangeValidatorTest {
public static VespaModel newTwoDocModel(String d1Content, String d2Content) {
return new ApplicationPackageBuilder().
addCluster(new ContentClusterBuilder().name("foo").docTypes("d1", "d2")).
- addSchemas(new SchemaBuilder().
+ addSearchDefinition(new SearchDefinitionBuilder().
name("d1").content(d1Content).build()).
- addSchemas(new SchemaBuilder().
+ addSearchDefinition(new SearchDefinitionBuilder().
name("d2").content(d2Content).build()).
buildCreator().create();
}
@@ -67,9 +67,9 @@ public class IndexedSearchClusterChangeValidatorTest {
return new ApplicationPackageBuilder().
addCluster(new ContentClusterBuilder().name("foo").docTypes("d1")).
addCluster(new ContentClusterBuilder().name("bar").docTypes("d2")).
- addSchemas(new SchemaBuilder().
+ addSearchDefinition(new SearchDefinitionBuilder().
name("d1").content(d1Content).build()).
- addSchemas(new SchemaBuilder().
+ addSearchDefinition(new SearchDefinitionBuilder().
name("d2").content(d2Content).build()).
buildCreator().create();
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StreamingSearchClusterChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StreamingSearchClusterChangeValidatorTest.java
index 8edbc964bfb..c5fee3efa99 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StreamingSearchClusterChangeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StreamingSearchClusterChangeValidatorTest.java
@@ -8,7 +8,7 @@ import com.yahoo.config.application.api.ValidationOverrides;
import com.yahoo.vespa.model.content.utils.ApplicationPackageBuilder;
import com.yahoo.vespa.model.content.utils.ContentClusterBuilder;
import com.yahoo.vespa.model.content.utils.DocType;
-import com.yahoo.vespa.model.content.utils.SchemaBuilder;
+import com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder;
import org.junit.Test;
import java.time.Instant;
@@ -40,7 +40,7 @@ public class StreamingSearchClusterChangeValidatorTest {
public static VespaModel createOneDocModel(String sdContent) {
return new ApplicationPackageBuilder()
.addCluster(new ContentClusterBuilder().name("foo").docTypes(Arrays.asList(DocType.streaming("d1"))))
- .addSchemas(new SchemaBuilder().name("d1").content(sdContent).build())
+ .addSearchDefinition(new SearchDefinitionBuilder().name("d1").content(sdContent).build())
.buildCreator().create();
}
@@ -51,8 +51,8 @@ public class StreamingSearchClusterChangeValidatorTest {
public static VespaModel createTwoDocModel(String d1Content, String d2Content) {
return new ApplicationPackageBuilder()
.addCluster(new ContentClusterBuilder().name("foo").docTypes(Arrays.asList(DocType.streaming("d1"), DocType.streaming("d2"))))
- .addSchemas(new SchemaBuilder().name("d1").content(d1Content).build())
- .addSchemas(new SchemaBuilder().name("d2").content(d2Content).build())
+ .addSearchDefinition(new SearchDefinitionBuilder().name("d1").content(d1Content).build())
+ .addSearchDefinition(new SearchDefinitionBuilder().name("d2").content(d2Content).build())
.buildCreator().create();
}
@@ -64,8 +64,8 @@ public class StreamingSearchClusterChangeValidatorTest {
return new ApplicationPackageBuilder()
.addCluster(new ContentClusterBuilder().name("foo").docTypes(Arrays.asList(DocType.streaming("d1"))))
.addCluster(new ContentClusterBuilder().name("bar").docTypes(Arrays.asList(DocType.streaming("d2"))))
- .addSchemas(new SchemaBuilder().name("d1").content(d1Content).build())
- .addSchemas(new SchemaBuilder().name("d2").content(d2Content).build())
+ .addSearchDefinition(new SearchDefinitionBuilder().name("d1").content(d1Content).build())
+ .addSearchDefinition(new SearchDefinitionBuilder().name("d2").content(d2Content).build())
.buildCreator().create();
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java
index 20ff9afd530..3827da08679 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/ContentClusterFixture.java
@@ -6,7 +6,7 @@ import com.yahoo.vespa.model.application.validation.change.VespaConfigChangeActi
import com.yahoo.vespa.model.content.cluster.ContentCluster;
import com.yahoo.vespa.model.content.utils.ContentClusterBuilder;
import com.yahoo.vespa.model.content.utils.ContentClusterUtils;
-import com.yahoo.vespa.model.content.utils.SchemaBuilder;
+import com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder;
import com.yahoo.vespa.model.search.DocumentDatabase;
import java.util.Arrays;
@@ -34,7 +34,7 @@ public abstract class ContentClusterFixture {
private static ContentCluster createCluster(String sdContent) throws Exception {
return new ContentClusterBuilder().build(
ContentClusterUtils.createMockRoot(
- Arrays.asList(new SchemaBuilder().content(sdContent).build())));
+ Arrays.asList(new SearchDefinitionBuilder().content(sdContent).build())));
}
protected DocumentDatabase currentDb() {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java
index b4fe4175707..31a2a6496d7 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/builder/xml/dom/ContentBuilderTest.java
@@ -236,8 +236,8 @@ public class ContentBuilderTest extends DomBuilderTest {
}
@Test
- public void requireThatContentStreamingHandlesMultipleSchemas() {
- String musicClusterId = "music-cluster-id";
+ public void requireThatContentStreamingHandlesMultipleSearchDefinitions() {
+ final String musicClusterId = "music-cluster-id";
ContentCluster cluster = createContentWithBooksToo(
"<content version='1.0' id='" + musicClusterId + "'>" +
@@ -825,8 +825,8 @@ public class ContentBuilderTest extends DomBuilderTest {
VespaModel m = new VespaModelCreatorWithMockPkg(new MockApplicationPackage.Builder()
.withHosts(getHosts())
.withServices(combined)
- .withSchemas(Arrays.asList(MockApplicationPackage.MUSIC_SEARCHDEFINITION,
- MockApplicationPackage.BOOK_SEARCHDEFINITION))
+ .withSearchDefinitions(Arrays.asList(MockApplicationPackage.MUSIC_SEARCHDEFINITION,
+ MockApplicationPackage.BOOK_SEARCHDEFINITION))
.build())
.create();
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java
index ac915d8a939..1f0b0188681 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java
@@ -190,7 +190,7 @@ public class SearchBuilderTest extends ContainerModelBuilderTestBase {
private VespaModel getVespaModelWithMusic(String hosts, String services) {
- return new VespaModelCreatorWithMockPkg(hosts, services, ApplicationPackageUtils.generateSchemas("music")).create();
+ return new VespaModelCreatorWithMockPkg(hosts, services, ApplicationPackageUtils.generateSearchDefinitions("music")).create();
}
private String hostsXml() {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java
index b08cc92d20c..305bcc1d7d5 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentClusterTest.java
@@ -26,7 +26,7 @@ import com.yahoo.vespa.model.content.cluster.ContentCluster;
import com.yahoo.vespa.model.content.engines.ProtonEngine;
import com.yahoo.vespa.model.content.utils.ContentClusterBuilder;
import com.yahoo.vespa.model.content.utils.ContentClusterUtils;
-import com.yahoo.vespa.model.content.utils.SchemaBuilder;
+import com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder;
import com.yahoo.vespa.model.routing.DocumentProtocol;
import com.yahoo.vespa.model.routing.Routing;
import com.yahoo.vespa.model.test.utils.ApplicationPackageUtils;
@@ -218,7 +218,7 @@ public class ContentClusterTest extends ContentBaseTest {
"\n" +
"</services>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1", "type2");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2");
VespaModel model = (new VespaModelCreatorWithMockPkg(null, xml, sds)).create();
assertEquals(2, model.getContentClusters().get("bar").getDocumentDefinitions().size());
ContainerCluster cluster = model.getAdmin().getClusterControllers();
@@ -259,7 +259,7 @@ public class ContentClusterTest extends ContentBaseTest {
" </services>";
DeployState.Builder deployStateBuilder = new DeployState.Builder().properties(properties);
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1");
return (new VespaModelCreatorWithMockPkg(null, services, sds)).create(deployStateBuilder);
}
@Test
@@ -301,7 +301,7 @@ public class ContentClusterTest extends ContentBaseTest {
"\n" +
"</services>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1", "type2");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(), xml, sds).create();
assertTrue(model.getContentClusters().get("bar").getPersistence() instanceof ProtonEngine.Factory);
@@ -340,7 +340,7 @@ public class ContentClusterTest extends ContentBaseTest {
" </content>\n" +
"</services>\n";
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1", "type2");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2");
try{
new VespaModelCreatorWithMockPkg(getHosts(), xml, sds).create();
assertTrue("Deploying without redundancy should fail", false);
@@ -697,7 +697,7 @@ public class ContentClusterTest extends ContentBaseTest {
"</services>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1", "type2");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(), xml, sds).create();
{
@@ -818,7 +818,7 @@ public class ContentClusterTest extends ContentBaseTest {
" </group>" +
"</content>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("true");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("true");
new VespaModelCreatorWithMockPkg(null, xml, sds).create();
}
@@ -865,7 +865,7 @@ public class ContentClusterTest extends ContentBaseTest {
" </group>" +
"</content>" +
"</services>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("bunnies", "hares", "rabbits");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("bunnies", "hares", "rabbits");
return new VespaModelCreatorWithMockPkg(getHosts(), xml, sds).create();
}
@@ -912,8 +912,8 @@ public class ContentClusterTest extends ContentBaseTest {
DeployState.Builder deployStateBuilder = new DeployState.Builder()
.zone(zone)
.properties(new TestProperties().setHostedVespa(true));
- List<String> schemas = SchemaBuilder.createSchemas("test");
- MockRoot root = ContentClusterUtils.createMockRoot(schemas, deployStateBuilder);
+ List<String> searchDefinitions = SearchDefinitionBuilder.createSearchDefinitions("test");
+ MockRoot root = ContentClusterUtils.createMockRoot(searchDefinitions, deployStateBuilder);
ContentCluster cluster = ContentClusterUtils.createCluster(clusterXml, root);
root.freezeModelTopology();
cluster.validate();
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java
index 3415044b088..98fa179b219 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/ContentSearchClusterTest.java
@@ -8,7 +8,7 @@ import com.yahoo.vespa.config.search.core.ProtonConfig;
import com.yahoo.vespa.model.content.cluster.ContentCluster;
import com.yahoo.vespa.model.content.utils.ContentClusterBuilder;
import com.yahoo.vespa.model.content.utils.DocType;
-import com.yahoo.vespa.model.content.utils.SchemaBuilder;
+import com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder;
import org.junit.Test;
import java.util.ArrayList;
@@ -17,7 +17,7 @@ import java.util.List;
import static com.yahoo.config.model.test.TestUtil.joinLines;
import static com.yahoo.vespa.model.content.utils.ContentClusterUtils.createCluster;
-import static com.yahoo.vespa.model.content.utils.SchemaBuilder.createSchemas;
+import static com.yahoo.vespa.model.content.utils.SearchDefinitionBuilder.createSearchDefinitions;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -38,7 +38,7 @@ public class ContentSearchClusterTest {
private static ContentCluster createClusterWithTwoDocumentType() throws Exception {
return createCluster(new ContentClusterBuilder().docTypes("foo", "bar").getXml(),
- createSchemas("foo", "bar"));
+ createSearchDefinitions("foo", "bar"));
}
private static ContentCluster createClusterWithGlobalType() throws Exception {
@@ -55,7 +55,7 @@ public class ContentSearchClusterTest {
"<node distribution-key='1' hostalias='mockhost'/>",
"</group>"));
String clusterXml = builder.getXml();
- return createCluster(clusterXml, createSchemas(docTypes));
+ return createCluster(clusterXml, createSearchDefinitions(docTypes));
}
private static ContentClusterBuilder createClusterBuilderWithGlobalType() {
@@ -127,19 +127,18 @@ public class ContentSearchClusterTest {
}
private static ContentCluster createClusterWithThreeDocumentTypes() throws Exception {
- List<String> schemas = new ArrayList<>();
- schemas.add(new SchemaBuilder().name("a")
- .content(joinLines("field ref_to_b type reference<b> { indexing: attribute }",
- "field ref_to_c type reference<c> { indexing: attribute }"))
- .build());
- schemas.add(new SchemaBuilder().name("b")
- .content("field ref_to_c type reference<c> { indexing: attribute }")
- .build());
- schemas.add(new SchemaBuilder().name("c").build());
- return createCluster(new ContentClusterBuilder().docTypes(List.of(DocType.index("a"),
- DocType.indexGlobal("b"),
- DocType.indexGlobal("c"))).getXml(),
- schemas);
+ List<String> searchDefinitions = new ArrayList<>();
+ searchDefinitions.add(new SearchDefinitionBuilder().name("a")
+ .content(joinLines("field ref_to_b type reference<b> { indexing: attribute }",
+ "field ref_to_c type reference<c> { indexing: attribute }")).build());
+ searchDefinitions.add(new SearchDefinitionBuilder().name("b")
+ .content("field ref_to_c type reference<c> { indexing: attribute }").build());
+ searchDefinitions.add(new SearchDefinitionBuilder().name("c").build());
+ return createCluster(new ContentClusterBuilder().docTypes(Arrays.asList(
+ DocType.index("a"),
+ DocType.indexGlobal("b"),
+ DocType.indexGlobal("c"))).getXml(),
+ searchDefinitions);
}
private static BucketspacesConfig getBucketspacesConfig(ContentCluster cluster) {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java
index 365dc74274d..f36ef6c3ba3 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/DistributorTest.java
@@ -24,7 +24,7 @@ public class DistributorTest {
ContentCluster parseCluster(String xml) {
try {
- List<String> searchDefs = ApplicationPackageUtils.generateSchemas("music", "movies", "bunnies");
+ List<String> searchDefs = ApplicationPackageUtils.generateSearchDefinitions("music", "movies", "bunnies");
MockRoot root = ContentClusterUtils.createMockRoot(searchDefs);
return ContentClusterUtils.createCluster(xml, root);
} catch (Exception e) {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java
index 51d0afc1f93..992edf6b1bb 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/GenericConfigTest.java
@@ -50,7 +50,7 @@ public class GenericConfigTest {
@Before
public void getVespaModel() {
- model = (new VespaModelCreatorWithMockPkg(ContentBaseTest.getHosts(), servicesXml(), ApplicationPackageUtils.generateSchemas("type1"))).create();
+ model = (new VespaModelCreatorWithMockPkg(ContentBaseTest.getHosts(), servicesXml(), ApplicationPackageUtils.generateSearchDefinitions("type1"))).create();
}
@Test
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java
index 504c3d9ba9c..ecf8f100288 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedTest.java
@@ -112,12 +112,12 @@ public class IndexedTest extends ContentBaseTest {
}
private VespaModelCreatorWithMockPkg getIndexedVespaModelCreator() {
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1", "type2", "type3");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2", "type3");
return new VespaModelCreatorWithMockPkg(getHosts(), createProtonIndexedVespaServices(Arrays.asList("type1", "type2", "type3")), sds);
}
private VespaModel getStreamingVespaModel() {
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1");
return new VespaModelCreatorWithMockPkg(getHosts(), createProtonStreamingVespaServices(Arrays.asList("type1")), sds).create();
}
@@ -229,7 +229,7 @@ public class IndexedTest extends ContentBaseTest {
" </content>\n" +
" </services>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("docstorebench");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("docstorebench");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(), services, sds).create();
ProtonConfig.Builder pb = new ProtonConfig.Builder();
model.getConfig(pb, "docstore/search/cluster.docstore/0");
@@ -252,7 +252,7 @@ public class IndexedTest extends ContentBaseTest {
" </content>" +
"</services>";
- List<String> sds = ApplicationPackageUtils.generateSchemas("index_me", "store_me");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("index_me", "store_me");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(), services, sds).create();
ProtonConfig.Builder pb = new ProtonConfig.Builder();
model.getConfig(pb, "docstore/search/cluster.docstore/0");
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java
index 177b86c953e..55d070d7247 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexingAndDocprocRoutingTest.java
@@ -164,7 +164,7 @@ public class IndexingAndDocprocRoutingTest extends ContentBaseTest {
" </container>\n" +
"</services>\n";
- List<String> sds = ApplicationPackageUtils.generateSchemas("music", "title", "artist");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("music", "title", "artist");
VespaModel model = new VespaModelCreatorWithMockPkg(getHosts(),
services, sds).create();
assertIndexing(model, new DocprocClusterSpec("dokprok"));
@@ -448,7 +448,7 @@ public class IndexingAndDocprocRoutingTest extends ContentBaseTest {
}
private VespaModel getIndexedSearchVespaModel(String xml) {
- List<String> sds = ApplicationPackageUtils.generateSchemas("music", "album", "artist");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("music", "album", "artist");
return new VespaModelCreatorWithMockPkg(getHosts(), xml, sds).create();
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageContentTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageContentTest.java
index e099476ebb6..c0ddd49069d 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/StorageContentTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/StorageContentTest.java
@@ -49,7 +49,7 @@ public class StorageContentTest extends ContentBaseTest {
}
private VespaModel getStorageVespaModel(String cluster1docs, String cluster2docs) {
- List<String> sds = ApplicationPackageUtils.generateSchemas("type1", "type2", "type3");
+ List<String> sds = ApplicationPackageUtils.generateSearchDefinitions("type1", "type2", "type3");
return new VespaModelCreatorWithMockPkg(getHosts(), createStorageVespaServices(cluster1docs, cluster2docs), sds).create();
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java
index 852844fe451..62221c206fd 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/cluster/ClusterTest.java
@@ -176,7 +176,7 @@ public class ClusterTest {
" </tuning>",
" </content>",
"</services>"))
- .withSchemas(ApplicationPackageUtils.generateSearchDefinition("my_document"))
+ .withSearchDefinitions(ApplicationPackageUtils.generateSearchDefinition("my_document"))
.build();
List<Content> contents = new TestDriver().buildModel(app).getConfigModels(Content.class);
assertEquals(1, contents.size());
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ApplicationPackageBuilder.java b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ApplicationPackageBuilder.java
index 5fc213fad1d..1b7f3e9b14d 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ApplicationPackageBuilder.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ApplicationPackageBuilder.java
@@ -14,7 +14,7 @@ import java.util.List;
public class ApplicationPackageBuilder {
private List<ContentClusterBuilder> contentClusters = new ArrayList<>();
- private List<String> schemas = new ArrayList<>();
+ private List<String> searchDefinitions = new ArrayList<>();
public ApplicationPackageBuilder() {
}
@@ -24,13 +24,13 @@ public class ApplicationPackageBuilder {
return this;
}
- public ApplicationPackageBuilder addSchemas(String schemas) {
- this.schemas.add(schemas);
+ public ApplicationPackageBuilder addSearchDefinition(String searchDefinition) {
+ searchDefinitions.add(searchDefinition);
return this;
}
public VespaModelCreatorWithMockPkg buildCreator() {
- return new VespaModelCreatorWithMockPkg(null, getServices(), schemas);
+ return new VespaModelCreatorWithMockPkg(null, getServices(), searchDefinitions);
}
private String getServices() {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java
index db9153fcf23..62d2bc51830 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/ContentClusterUtils.java
@@ -30,31 +30,31 @@ import java.util.Optional;
public class ContentClusterUtils {
public static MockRoot createMockRoot(String[] hosts) {
- return createMockRoot(hosts, SchemaBuilder.createSchemas("test"));
+ return createMockRoot(hosts, SearchDefinitionBuilder.createSearchDefinitions("test"));
}
- private static MockRoot createMockRoot(HostProvisioner provisioner, List<String> schemas) {
- return createMockRoot(provisioner, schemas, new DeployState.Builder());
+ private static MockRoot createMockRoot(HostProvisioner provisioner, List<String> searchDefinitions) {
+ return createMockRoot(provisioner, searchDefinitions, new DeployState.Builder());
}
- private static MockRoot createMockRoot(HostProvisioner provisioner, List<String> schemas, DeployState.Builder deployStateBuilder) {
- ApplicationPackage applicationPackage = new MockApplicationPackage.Builder().withSchemas(schemas).build();
+ private static MockRoot createMockRoot(HostProvisioner provisioner, List<String> searchDefinitions, DeployState.Builder deployStateBuilder) {
+ ApplicationPackage applicationPackage = new MockApplicationPackage.Builder().withSearchDefinitions(searchDefinitions).build();
DeployState deployState = deployStateBuilder.applicationPackage(applicationPackage)
.modelHostProvisioner(provisioner)
.build();
return new MockRoot("", deployState);
}
- public static MockRoot createMockRoot(String[] hosts, List<String> schemas) {
- return createMockRoot(new InMemoryProvisioner(true, hosts), schemas);
+ public static MockRoot createMockRoot(String[] hosts, List<String> searchDefinitions) {
+ return createMockRoot(new InMemoryProvisioner(true, hosts), searchDefinitions);
}
- public static MockRoot createMockRoot(List<String> schemas) {
- return createMockRoot(new SingleNodeProvisioner(), schemas);
+ public static MockRoot createMockRoot(List<String> searchDefinitions) {
+ return createMockRoot(new SingleNodeProvisioner(), searchDefinitions);
}
- public static MockRoot createMockRoot(List<String> schemas, DeployState.Builder deployStateBuilder) {
- return createMockRoot(new SingleNodeProvisioner(), schemas, deployStateBuilder);
+ public static MockRoot createMockRoot(List<String> searchDefinitions, DeployState.Builder deployStateBuilder) {
+ return createMockRoot(new SingleNodeProvisioner(), searchDefinitions, deployStateBuilder);
}
public static ContentCluster createCluster(String clusterXml, MockRoot root) {
@@ -63,13 +63,13 @@ public class ContentClusterUtils {
new FileDistributionConfigProducer(root, new MockFileRegistry(), null),
root.getDeployState().isHosted());
ConfigModelContext context = ConfigModelContext.create(null, root.getDeployState(),
- null,null, root, null);
+ null,null, root, null);
return new ContentCluster.Builder(admin).build(Collections.emptyList(), context, doc.getDocumentElement());
}
- public static ContentCluster createCluster(String clusterXml, List<String> schemas) throws Exception {
- MockRoot root = createMockRoot(schemas);
+ public static ContentCluster createCluster(String clusterXml, List<String> searchDefinitions) throws Exception {
+ MockRoot root = createMockRoot(searchDefinitions);
ContentCluster cluster = createCluster(clusterXml, root);
root.freezeModelTopology();
cluster.validate();
@@ -77,7 +77,7 @@ public class ContentClusterUtils {
}
public static ContentCluster createCluster(String clusterXml) throws Exception {
- return createCluster(clusterXml, SchemaBuilder.createSchemas("test"));
+ return createCluster(clusterXml, SearchDefinitionBuilder.createSearchDefinitions("test"));
}
public static String createClusterXml(String groupXml, int redundancy, int searchableCopies) {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/SchemaBuilder.java b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/SearchDefinitionBuilder.java
index c18dac17064..c622bcfaec5 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/content/utils/SchemaBuilder.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/content/utils/SearchDefinitionBuilder.java
@@ -12,20 +12,20 @@ import static com.yahoo.config.model.test.TestUtil.joinLines;
*
* @author geirst
*/
-public class SchemaBuilder {
+public class SearchDefinitionBuilder {
private String name = "test";
private String content = "";
- public SchemaBuilder() {
+ public SearchDefinitionBuilder() {
}
- public SchemaBuilder name(String name) {
+ public SearchDefinitionBuilder name(String name) {
this.name = name;
return this;
}
- public SchemaBuilder content(String content) {
+ public SearchDefinitionBuilder content(String content) {
this.content = content;
return this;
}
@@ -38,10 +38,10 @@ public class SchemaBuilder {
"}");
}
- public static List<String> createSchemas(String ... docTypes) {
+ public static List<String> createSearchDefinitions(String ... docTypes) {
return Arrays.asList(docTypes)
.stream()
- .map(type -> new SchemaBuilder().name(type).build())
+ .map(type -> new SearchDefinitionBuilder().name(type).build())
.collect(Collectors.toList());
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
index 97417f5a522..177e741937d 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
@@ -90,7 +90,7 @@ public class DocumentDatabaseTestCase {
private void assertSingleSD(String mode) {
final List<String> sds = Arrays.asList("type1");
VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(sds, mode),
- ApplicationPackageUtils.generateSchemas(sds)).create();
+ ApplicationPackageUtils.generateSearchDefinitions(sds)).create();
IndexedSearchCluster indexedSearchCluster = (IndexedSearchCluster)model.getSearchClusters().get(0);
ContentSearchCluster contentSearchCluster = model.getContentClusters().get("test").getSearch();
assertEquals(1, indexedSearchCluster.getDocumentDbs().size());
@@ -111,7 +111,7 @@ public class DocumentDatabaseTestCase {
sds.add(nameAndMode.getType());
}
return new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServicesXml(nameAndModes, xmlTuning),
- ApplicationPackageUtils.generateSchemas(sds)).create();
+ ApplicationPackageUtils.generateSearchDefinitions(sds)).create();
}
@Test
@@ -211,10 +211,10 @@ public class DocumentDatabaseTestCase {
}
@Test
- public void testMultipleSchemas() {
- List<String> sds = List.of("type1", "type2", "type3");
+ public void requireThatWeCanHaveMultipleSearchDefinitions() {
+ final List<String> sds = Arrays.asList("type1", "type2", "type3");
VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(sds, "index"),
- ApplicationPackageUtils.generateSchemas(sds)).create();
+ ApplicationPackageUtils.generateSearchDefinitions(sds)).create();
IndexedSearchCluster indexedSearchCluster = (IndexedSearchCluster)model.getSearchClusters().get(0);
ContentSearchCluster contentSearchCluster = model.getContentClusters().get("test").getSearch();
String type1Id = "test/search/cluster.test/type1";
@@ -264,7 +264,7 @@ public class DocumentDatabaseTestCase {
public void requireThatRelevantConfigIsAvailableForClusterSearcher() {
final List<String> sds = Arrays.asList("type1", "type2");
VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(sds, "index"),
- ApplicationPackageUtils.generateSchemas(sds)).create();
+ ApplicationPackageUtils.generateSearchDefinitions(sds)).create();
String searcherId = "container/searchchains/chain/test/component/com.yahoo.prelude.cluster.ClusterSearcher";
{ // documentdb-info config
@@ -325,7 +325,7 @@ public class DocumentDatabaseTestCase {
private void assertDocumentDBConfigAvailableForStreaming(String mode) {
final List<String> sds = Arrays.asList("type");
VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(sds, mode),
- ApplicationPackageUtils.generateSchemas(sds)).create();
+ ApplicationPackageUtils.generateSearchDefinitions(sds)).create();
DocumentdbInfoConfig dcfg = model.getConfig(DocumentdbInfoConfig.class, "test/search/cluster.test.type");
assertEquals(1, dcfg.documentdb().size());
@@ -343,7 +343,7 @@ public class DocumentDatabaseTestCase {
List<String> documentDBConfigIds,
Map<String, List<String>> expectedAttributesMap) {
VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(sds, mode),
- ApplicationPackageUtils.generateSchemas(sds)).create();
+ ApplicationPackageUtils.generateSearchDefinitions(sds)).create();
ContentSearchCluster contentSearchCluster = model.getContentClusters().get("test").getSearch();
ProtonConfig proton = getProtonCfg(contentSearchCluster);
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchClusterTest.java
index ea4b3db5ebb..70e307e1748 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/SearchClusterTest.java
@@ -127,7 +127,7 @@ public class SearchClusterTest {
" </content>" +
"</services>";
- VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, services, ApplicationPackageUtils.generateSchemas("music")).create();
+ VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, services, ApplicationPackageUtils.generateSearchDefinitions("music")).create();
ContainerCluster containerCluster1 = (ContainerCluster)model.getConfigProducer("j1").get();
assertFalse(containerCluster1.getSearch().getChains().localProviders().isEmpty());
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/test/utils/ApplicationPackageUtils.java b/config-model/src/test/java/com/yahoo/vespa/model/test/utils/ApplicationPackageUtils.java
index df62a3bff07..ee6fc60ba46 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/test/utils/ApplicationPackageUtils.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/test/utils/ApplicationPackageUtils.java
@@ -44,14 +44,14 @@ public class ApplicationPackageUtils {
}
public static List<String> generateSearchDefinition(String name) {
- return generateSchemas(name);
+ return generateSearchDefinitions(name);
}
- public static List<String> generateSchemas(String ... sdNames) {
- return generateSchemas(Arrays.asList(sdNames));
+ public static List<String> generateSearchDefinitions(String ... sdNames) {
+ return generateSearchDefinitions(Arrays.asList(sdNames));
}
- public static List<String> generateSchemas(List<String> sdNames) {
+ public static List<String> generateSearchDefinitions(List<String> sdNames) {
List<String> sds = new ArrayList<>();
int i = 0;
for (String sdName : sdNames) {
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithMockPkg.java b/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithMockPkg.java
index 70ce588bec1..814ec008285 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithMockPkg.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/test/utils/VespaModelCreatorWithMockPkg.java
@@ -31,8 +31,8 @@ public class VespaModelCreatorWithMockPkg {
this(new MockApplicationPackage.Builder().withHosts(hosts).withServices(services).build());
}
- public VespaModelCreatorWithMockPkg(String hosts, String services, List<String> schemas) {
- this(new MockApplicationPackage.Builder().withHosts(hosts).withServices(services).withSchemas(schemas).build());
+ public VespaModelCreatorWithMockPkg(String hosts, String services, List<String> searchDefinitions) {
+ this(new MockApplicationPackage.Builder().withHosts(hosts).withServices(services).withSearchDefinitions(searchDefinitions).build());
}
public VespaModelCreatorWithMockPkg(ApplicationPackage appPkg) {