summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/processing
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/processing')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/AssertSearchBuilder.java6
-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.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/BoolAttributeValidatorTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java10
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/FastAccessValidatorTest.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSchemaFieldsTestCase.java18
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummariesTestCase.java10
-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/ImportedFieldsTestCase.java24
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingScriptRewriterTestCase.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.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/MatchedElementsOnlyResolverTestCase.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/NGramTestCase.java10
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/PagedAttributeValidatorTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java16
-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/RankProfileSearchFixture.java6
-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/RankingExpressionTypeResolverTestCase.java42
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTransformerTokensTestCase.java10
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionsTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java8
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ReservedRankingExpressionFunctionNamesTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/SchemaMustHaveDocumentTest.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryConsistencyTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryFieldsMustHaveValidSourceTestCase.java10
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java7
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/WeightedSetSummaryToTestCase.java4
33 files changed, 131 insertions, 132 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AssertSearchBuilder.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/AssertSearchBuilder.java
index d32dd961a85..6a736a5331e 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/AssertSearchBuilder.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/AssertSearchBuilder.java
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.processing;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import java.io.IOException;
@@ -14,13 +14,13 @@ import static org.junit.Assert.*;
public abstract class AssertSearchBuilder {
public static void assertBuilds(String searchDefinitionFileName) throws IOException, ParseException {
- assertNotNull(SearchBuilder.buildFromFile(searchDefinitionFileName));
+ assertNotNull(SchemaBuilder.buildFromFile(searchDefinitionFileName));
}
public static void assertBuildFails(String searchDefinitionFileName, String expectedException)
throws IOException, ParseException {
try {
- SearchBuilder.buildFromFile(searchDefinitionFileName);
+ SchemaBuilder.buildFromFile(searchDefinitionFileName);
fail(searchDefinitionFileName);
} catch (IllegalArgumentException e) {
assertEquals(expectedException, e.getMessage());
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 57e01cb9dfc..f1aa64c1a60 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
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.document.Matching;
import com.yahoo.searchdefinition.parser.ParseException;
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertFalse;
public class AttributesExactMatchTestCase extends AbstractSchemaTestCase {
@Test
public void testAttributesExactMatch() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/attributesexactmatch.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/attributesexactmatch.sd");
assertEquals(schema.getConcreteField("color").getMatching().getType(), Matching.Type.EXACT);
assertEquals(schema.getConcreteField("artist").getMatching().getType(), Matching.Type.WORD);
assertEquals(schema.getConcreteField("drummer").getMatching().getType(), Matching.Type.WORD);
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 d9d8e47338b..f74e46d92dc 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
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.processing;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -31,7 +31,7 @@ public class BoldingTestCase extends AbstractSchemaTestCase {
@Test
public void testBoldOnNonString() throws ParseException {
try {
- SearchBuilder.createFromString(boldonnonstring);
+ SchemaBuilder.createFromString(boldonnonstring);
fail("Expected exception");
} catch (IllegalArgumentException e) {
assertEquals("'bolding: on' for non-text field 'year4' (datatype int (code: 0)) is not allowed",
@@ -52,7 +52,7 @@ public class BoldingTestCase extends AbstractSchemaTestCase {
@Test
public void testBoldOnArray() throws ParseException {
try {
- SearchBuilder.createFromString(boldonarray);
+ SchemaBuilder.createFromString(boldonarray);
fail("Expected exception");
} catch (IllegalArgumentException e) {
assertEquals("'bolding: on' for non-text field 'myarray' (datatype Array<string> (code: -1486737430)) is not allowed",
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoolAttributeValidatorTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoolAttributeValidatorTestCase.java
index fbfb46be558..342ff4ba2d4 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoolAttributeValidatorTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/BoolAttributeValidatorTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
-import static com.yahoo.searchdefinition.SearchBuilder.createFromString;
+import static com.yahoo.searchdefinition.SchemaBuilder.createFromString;
import static com.yahoo.config.model.test.TestUtil.joinLines;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java
index 806b9b3358d..6f8ab24de8e 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.config.model.test.TestUtil;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.derived.AttributeFields;
import com.yahoo.searchdefinition.document.Case;
import com.yahoo.searchdefinition.document.Dictionary;
@@ -30,8 +30,8 @@ public class DictionaryTestCase {
return builder.build();
}
private Schema createSearch(String def) throws ParseException {
- SearchBuilder sb = SearchBuilder.createFromString(def);
- return sb.getSearch();
+ SchemaBuilder sb = SchemaBuilder.createFromString(def);
+ return sb.getSchema();
}
@Test
public void testDefaultDictionarySettings() throws ParseException {
@@ -196,7 +196,7 @@ public class DictionaryTestCase {
" }",
"}");
try {
- SearchBuilder sb = SearchBuilder.createFromString(def);
+ SchemaBuilder sb = SchemaBuilder.createFromString(def);
fail("Controlling dictionary for non-numeric fields are not yet supported.");
} catch (IllegalArgumentException e) {
assertEquals("For schema 'test', field 'n1': You can only specify 'dictionary:' for numeric or string fields", e.getMessage());
@@ -214,7 +214,7 @@ public class DictionaryTestCase {
" }",
"}");
try {
- SearchBuilder sb = SearchBuilder.createFromString(def);
+ SchemaBuilder sb = SchemaBuilder.createFromString(def);
fail("Controlling dictionary for non-fast-search fields are not allowed.");
} catch (IllegalArgumentException e) {
assertEquals("For schema 'test', field 'n1': You must specify 'attribute:fast-search' to allow dictionary control", e.getMessage());
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java
index dc6f9b0d6db..03125c48d1d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DisallowComplexMapAndWsetKeyTypesTestCase.java
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.RankProfileRegistry;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -43,7 +43,7 @@ public class DisallowComplexMapAndWsetKeyTypesTestCase {
private void testFieldType(String fieldType) throws ParseException {
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
- SearchBuilder builder = new SearchBuilder(rankProfileRegistry);
+ SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry);
builder.importString(
"search test {\n" +
" document test { \n" +
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/FastAccessValidatorTest.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/FastAccessValidatorTest.java
index 0a9807e0746..00f67c80084 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/FastAccessValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/FastAccessValidatorTest.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.config.model.test.TestUtil;
import com.yahoo.searchdefinition.RankProfileRegistry;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Rule;
import org.junit.Test;
@@ -19,7 +19,7 @@ public class FastAccessValidatorTest {
@Test
public void throws_exception_on_incompatible_use_of_fastaccess() throws ParseException {
- SearchBuilder builder = new SearchBuilder(new RankProfileRegistry());
+ SchemaBuilder builder = new SchemaBuilder(new RankProfileRegistry());
builder.importString(
TestUtil.joinLines(
"schema parent {",
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSchemaFieldsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSchemaFieldsTestCase.java
index dffc0d968df..43077fadfcd 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSchemaFieldsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSchemaFieldsTestCase.java
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.derived.DerivedConfiguration;
import com.yahoo.searchdefinition.document.SDDocumentType;
@@ -18,7 +18,7 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatExtraFieldsAreIncluded() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/extrafield.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/extrafield.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
@@ -30,7 +30,7 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatSummaryFieldsAreIncluded() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/summaryfield.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/summaryfield.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
@@ -43,7 +43,7 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatBoldedSummaryFieldsAreIncluded() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/boldedsummaryfields.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/boldedsummaryfields.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
@@ -57,7 +57,7 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatUntransformedSummaryFieldsAreIgnored() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/untransformedsummaryfields.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/untransformedsummaryfields.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
@@ -70,7 +70,7 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatDynamicSummaryFieldsAreIgnored() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/dynamicsummaryfields.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/dynamicsummaryfields.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
@@ -82,11 +82,11 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatDerivedConfigurationWorks() throws IOException, ParseException {
- SearchBuilder sb = new SearchBuilder();
+ SchemaBuilder sb = new SchemaBuilder();
sb.importFile("src/test/examples/nextgen/simple.sd");
sb.build();
- assertNotNull(sb.getSearch());
- new DerivedConfiguration(sb.getSearch(), sb.getRankProfileRegistry());
+ assertNotNull(sb.getSchema());
+ new DerivedConfiguration(sb.getSchema(), sb.getRankProfileRegistry());
}
}
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 b069f62ee92..bd645b68728 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
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.document.*;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.document.SDField;
@@ -16,7 +16,7 @@ import static org.junit.Assert.*;
public class ImplicitStructTypesTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatImplicitStructsAreCreated() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/toggleon.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/toggleon.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
@@ -25,7 +25,7 @@ public class ImplicitStructTypesTestCase extends AbstractSchemaTestCase {
}
@Test
public void testRequireThatImplicitStructsAreUsed() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/nextgen/implicitstructtypes.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/nextgen/implicitstructtypes.sd");
assertNotNull(schema);
SDDocumentType docType = schema.getDocument();
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummariesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummariesTestCase.java
index 9f4008b5b39..9c1e5d0d8d7 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummariesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSummariesTestCase.java
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.documentmodel.SummaryTransform;
import org.junit.Test;
@@ -29,7 +29,7 @@ public class ImplicitSummariesTestCase {
LogHandler log = new LogHandler();
Logger.getLogger("").addHandler(log);
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/implicitsummaries_attribute.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/implicitsummaries_attribute.sd");
assertNotNull(schema);
assertTrue(log.records.isEmpty());
}
@@ -60,19 +60,19 @@ public class ImplicitSummariesTestCase {
@Test
public void attribute_combiner_transform_is_set_on_array_of_struct_with_only_struct_field_attributes() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/derived/array_of_struct_attribute/test.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/derived/array_of_struct_attribute/test.sd");
assertEquals(SummaryTransform.ATTRIBUTECOMBINER, schema.getSummaryField("elem_array").getTransform());
}
@Test
public void attribute_combiner_transform_is_set_on_map_of_struct_with_only_struct_field_attributes() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/derived/map_of_struct_attribute/test.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/derived/map_of_struct_attribute/test.sd");
assertEquals(SummaryTransform.ATTRIBUTECOMBINER, schema.getSummaryField("str_elem_map").getTransform());
}
@Test
public void attribute_combiner_transform_is_not_set_when_map_of_struct_has_some_struct_field_attributes() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/derived/map_of_struct_attribute/test.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/derived/map_of_struct_attribute/test.sd");
assertEquals(SummaryTransform.NONE, schema.getSummaryField("int_elem_map").getTransform());
}
}
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 c9f941087ef..44b1d9387f1 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
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.documentmodel.DocumentSummary;
@@ -17,7 +17,7 @@ public class ImplicitSummaryFieldsTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatImplicitFieldsAreCreated() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/implicitsummaryfields.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/implicitsummaryfields.sd");
assertNotNull(schema);
DocumentSummary docsum = schema.getSummary("default");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImportedFieldsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImportedFieldsTestCase.java
index 37b7ab0955c..0ece6d57fe1 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImportedFieldsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImportedFieldsTestCase.java
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.derived.AttributeFields;
import com.yahoo.searchdefinition.document.ImportedComplexField;
import com.yahoo.searchdefinition.document.ImportedField;
@@ -67,7 +67,7 @@ public class ImportedFieldsTestCase {
}
private static Schema buildAdSearch(String sdContent) throws ParseException {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"schema campaign {",
" document campaign {",
@@ -82,7 +82,7 @@ public class ImportedFieldsTestCase {
"}"));
builder.importString(sdContent);
builder.build();
- return builder.getSearch("ad");
+ return builder.getSchema("ad");
}
private static void checkStructImport(AncestorStructSdBuilder parentBuilder) throws ParseException {
@@ -311,20 +311,20 @@ public class ImportedFieldsTestCase {
}
private static Schema buildChildSearch(String parentSdContent, String sdContent) throws ParseException {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(parentSdContent);
builder.importString(sdContent);
builder.build();
- return builder.getSearch("child");
+ return builder.getSchema("child");
}
private static Schema buildChildSearch(String grandParentSdContent, String parentSdContent, String sdContent) throws ParseException {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(grandParentSdContent);
builder.importString(parentSdContent);
builder.importString(sdContent);
builder.build();
- return builder.getSearch("child");
+ return builder.getSchema("child");
}
private static class AncestorPosSdBuilder extends NamedSdBuilder {
@@ -468,10 +468,10 @@ public class ImportedFieldsTestCase {
public void field_with_struct_field_attributes_can_be_imported_from_parents_that_use_inheritance() throws ParseException {
var builder = buildParentsUsingInheritance();
- assertParentContainsEntriesAttributes(builder.getSearch("parent_a"));
- assertParentContainsEntriesAttributes(builder.getSearch("parent_b"));
+ assertParentContainsEntriesAttributes(builder.getSchema("parent_a"));
+ assertParentContainsEntriesAttributes(builder.getSchema("parent_b"));
- var child = builder.getSearch("child");
+ var child = builder.getSchema("child");
checkImportedField("entries_from_a", "ref_parent_a", "parent_a", "entries", child, true);
checkImportedField("entries_from_a.key", "ref_parent_a", "parent_a", "entries.key", child, true);
checkImportedField("entries_from_a.value", "ref_parent_a", "parent_a", "entries.value", child, true);
@@ -487,8 +487,8 @@ public class ImportedFieldsTestCase {
assertTrue(attrs.containsAttribute("entries.value"));
}
- private SearchBuilder buildParentsUsingInheritance() throws ParseException {
- var builder = new SearchBuilder();
+ private SchemaBuilder buildParentsUsingInheritance() throws ParseException {
+ var builder = new SchemaBuilder();
builder.importString(joinLines("schema parent_a {",
"document parent_a {",
" struct Entry {",
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 9cbecddfffa..3105e3c7efd 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
@@ -6,7 +6,7 @@ import com.yahoo.document.DataType;
import com.yahoo.searchdefinition.Index;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.document.BooleanIndexDefinition;
import com.yahoo.searchdefinition.document.SDDocumentType;
@@ -120,7 +120,7 @@ public class IndexingScriptRewriterTestCase extends AbstractSchemaTestCase {
"clear_state | guard { input smallattribute | attribute smallattribute; }",
"clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }",
"clear_state | guard { input title . \" \" . input category | tokenize | summary exact | index exact; }"),
- SearchBuilder.buildFromFile("src/test/examples/simple.sd"));
+ SchemaBuilder.buildFromFile("src/test/examples/simple.sd"));
}
@Test
@@ -129,7 +129,7 @@ public class IndexingScriptRewriterTestCase extends AbstractSchemaTestCase {
Arrays.asList("clear_state | guard { input title_src | lowercase | normalize | " +
" tokenize | index title; }",
"clear_state | guard { input title_src | summary title_s; }"),
- SearchBuilder.buildFromFile("src/test/examples/indexrewrite.sd"));
+ SchemaBuilder.buildFromFile("src/test/examples/indexrewrite.sd"));
}
@Test
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java
index 9f8e810f1f8..5b5c5cedc0d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IndexingValidationTestCase.java
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.processing;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.derived.AbstractExportingTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -64,7 +64,7 @@ public class IndexingValidationTestCase extends AbstractExportingTestCase {
assertIndexing(
Arrays.asList("clear_state | guard { input my_index | tokenize normalize stem:\"BEST\" | index my_index | summary my_index }",
"clear_state | guard { input my_input | tokenize normalize stem:\"BEST\" | index my_extra | summary my_extra }"),
- SearchBuilder.buildFromFile("src/test/examples/indexing_extra.sd"));
+ SchemaBuilder.buildFromFile("src/test/examples/indexing_extra.sd"));
}
@Test
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 cd5dd451026..4b13590c777 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/IntegerIndex2AttributeTestCase.java
@@ -4,7 +4,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.searchdefinition.parser.ParseException;
@@ -24,7 +24,7 @@ public class IntegerIndex2AttributeTestCase extends AbstractSchemaTestCase {
@Test
public void testIntegerIndex2Attribute() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/integerindex2attribute.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/integerindex2attribute.sd");
new IntegerIndex2Attribute(schema, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfiles()).process(true, false);
SDField f;
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolverTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolverTestCase.java
index fc44d61541e..568e2d65d2c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolverTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolverTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.documentmodel.SummaryField;
import com.yahoo.vespa.documentmodel.SummaryTransform;
@@ -174,7 +174,7 @@ public class MatchedElementsOnlyResolverTestCase {
}
private Schema buildSearch(String field, String summary) throws ParseException {
- var builder = new SearchBuilder(new RankProfileRegistry());
+ var builder = new SchemaBuilder(new RankProfileRegistry());
builder.importString(joinLines("search test {",
" document test {",
" struct elem {",
@@ -186,6 +186,6 @@ public class MatchedElementsOnlyResolverTestCase {
summary,
"}"));
builder.build();
- return builder.getSearch();
+ return builder.getSchema();
}
}
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 0e13aacb76f..1adb909ff21 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
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.document.Matching;
import com.yahoo.searchdefinition.document.SDField;
@@ -25,7 +25,7 @@ public class NGramTestCase extends AbstractSchemaTestCase {
@Test
public void testNGram() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/ngram.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/ngram.sd");
assertNotNull(schema);
SDField gram1 = schema.getConcreteField("gram_1");
@@ -55,7 +55,7 @@ public class NGramTestCase extends AbstractSchemaTestCase {
@Test
public void testInvalidNGramSetting1() throws IOException, ParseException {
try {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/invalidngram1.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/invalidngram1.sd");
fail("Should cause an exception");
}
catch (IllegalArgumentException e) {
@@ -66,7 +66,7 @@ public class NGramTestCase extends AbstractSchemaTestCase {
@Test
public void testInvalidNGramSetting2() throws IOException, ParseException {
try {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/invalidngram2.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/invalidngram2.sd");
fail("Should cause an exception");
}
catch (IllegalArgumentException e) {
@@ -77,7 +77,7 @@ public class NGramTestCase extends AbstractSchemaTestCase {
@Test
public void testInvalidNGramSetting3() throws IOException, ParseException {
try {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/invalidngram3.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/invalidngram3.sd");
fail("Should cause an exception");
}
catch (IllegalArgumentException e) {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/PagedAttributeValidatorTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/PagedAttributeValidatorTestCase.java
index 360072c1da7..5fce16f381a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/PagedAttributeValidatorTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/PagedAttributeValidatorTestCase.java
@@ -5,7 +5,7 @@ import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
import static com.yahoo.config.model.test.TestUtil.joinLines;
-import static com.yahoo.searchdefinition.SearchBuilder.createFromString;
+import static com.yahoo.searchdefinition.SchemaBuilder.createFromString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java
index 67e47b7f2ae..c3beeeaa17e 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java
@@ -5,7 +5,7 @@ import com.yahoo.document.DataType;
import com.yahoo.document.DocumentType;
import com.yahoo.document.PositionDataType;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.document.Attribute;
import com.yahoo.searchdefinition.document.FieldSet;
import com.yahoo.vespa.documentmodel.SummaryField;
@@ -27,18 +27,18 @@ public class PositionTestCase {
@Test
public void inherited_position_zcurve_field_is_not_added_to_document_fieldset() throws Exception {
- SearchBuilder sb = SearchBuilder.createFromFiles(Arrays.asList(
+ SchemaBuilder sb = SchemaBuilder.createFromFiles(Arrays.asList(
"src/test/examples/position_base.sd",
"src/test/examples/position_inherited.sd"));
- Schema schema = sb.getSearch("position_inherited");
+ Schema schema = sb.getSchema("position_inherited");
FieldSet fieldSet = schema.getDocument().getFieldSets().builtInFieldSets().get(DocumentType.DOCUMENT);
assertFalse(fieldSet.getFieldNames().contains(PositionDataType.getZCurveFieldName("pos")));
}
@Test
public void requireThatPositionCanBeAttribute() throws Exception {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/position_attribute.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/position_attribute.sd");
assertNull(schema.getAttribute("pos"));
assertNull(schema.getAttribute("pos.x"));
assertNull(schema.getAttribute("pos.y"));
@@ -50,7 +50,7 @@ public class PositionTestCase {
@Test
public void requireThatPositionCanNotBeIndex() throws Exception {
try {
- SearchBuilder.buildFromFile("src/test/examples/position_index.sd");
+ SchemaBuilder.buildFromFile("src/test/examples/position_index.sd");
fail();
} catch (IllegalArgumentException e) {
assertEquals("For schema 'position_index', field 'pos': Indexing of data type 'position' is not " +
@@ -60,7 +60,7 @@ public class PositionTestCase {
@Test
public void requireThatSummaryAloneDoesNotCreateZCurve() throws Exception {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/position_summary.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/position_summary.sd");
assertNull(schema.getAttribute("pos"));
assertNull(schema.getAttribute("pos.x"));
assertNull(schema.getAttribute("pos.y"));
@@ -79,7 +79,7 @@ public class PositionTestCase {
@Test
public void requireThatExtraFieldCanBePositionAttribute() throws Exception {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/position_extra.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/position_extra.sd");
assertNull(schema.getAttribute("pos_ext"));
assertNull(schema.getAttribute("pos_ext.x"));
assertNull(schema.getAttribute("pos_ext.y"));
@@ -90,7 +90,7 @@ public class PositionTestCase {
@Test
public void requireThatPositionArrayIsSupported() throws Exception {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/position_array.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/position_array.sd");
assertNull(schema.getAttribute("pos"));
assertNull(schema.getAttribute("pos.x"));
assertNull(schema.getAttribute("pos.y"));
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 97eed506c85..87dd92f41d9 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
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -17,6 +17,6 @@ import java.io.IOException;
public class RankModifierTestCase extends AbstractSchemaTestCase {
@Test
public void testLiteral() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/rankmodifier/literal.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/rankmodifier/literal.sd");
}
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
index 7ffb20859e9..2707f60f828 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
@@ -13,7 +13,7 @@ import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModels;
import ai.vespa.rankingexpression.importer.onnx.OnnxImporter;
@@ -68,7 +68,7 @@ class RankProfileSearchFixture {
String rankProfiles, String constant, String field)
throws ParseException {
this.queryProfileRegistry = queryProfileRegistry;
- SearchBuilder builder = new SearchBuilder(applicationpackage, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
+ SchemaBuilder builder = new SchemaBuilder(applicationpackage, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
String sdContent = "search test {\n" +
" " + (constant != null ? constant : "") + "\n" +
" document test {\n" +
@@ -79,7 +79,7 @@ class RankProfileSearchFixture {
"}";
builder.importString(sdContent);
builder.build();
- schema = builder.getSearch();
+ schema = builder.getSchema();
}
public void assertFirstPhaseExpression(String expExpression, String rankProfile) {
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 5c53dbf0c57..b1624b7fd7e 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
@@ -6,7 +6,7 @@ import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.RankProfile.RankProperty;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -21,7 +21,7 @@ public class RankPropertyVariablesTestCase extends AbstractSchemaTestCase {
@Test
public void testRankPropVariables() throws IOException, ParseException {
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/rankpropvars.sd",
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/rankpropvars.sd",
new BaseDeployLogger(),
rankProfileRegistry,
new QueryProfileRegistry());
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionTypeResolverTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionTypeResolverTestCase.java
index 3bdcca52236..4f18c9b68fd 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionTypeResolverTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionTypeResolverTestCase.java
@@ -7,7 +7,7 @@ import com.yahoo.search.query.profile.types.QueryProfileType;
import com.yahoo.search.query.profile.types.TensorFieldType;
import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchdefinition.RankProfileRegistry;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchlib.rankingexpression.rule.ReferenceNode;
import com.yahoo.tensor.TensorType;
import com.yahoo.yolean.Exceptions;
@@ -33,7 +33,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void tensorFirstPhaseMustProduceDouble() throws Exception {
try {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -61,7 +61,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void tensorFirstPhaseFromConstantMustProduceDouble() throws Exception {
try {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -110,7 +110,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void tensorSecondPhaseMustProduceDouble() throws Exception {
try {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -140,8 +140,8 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void tensorConditionsMustHaveTypeCompatibleBranches() throws Exception {
try {
- SearchBuilder searchBuilder = new SearchBuilder();
- searchBuilder.importString(joinLines(
+ SchemaBuilder schemaBuilder = new SchemaBuilder();
+ schemaBuilder.importString(joinLines(
"search test {",
" document test { ",
" field a type tensor(x[10],y[5]) {",
@@ -158,7 +158,7 @@ public class RankingExpressionTypeResolverTestCase {
" }",
"}"
));
- searchBuilder.build();
+ schemaBuilder.build();
fail("Expected exception");
}
catch (IllegalArgumentException expected) {
@@ -172,7 +172,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void testFunctionInvocationTypes() throws Exception {
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
- SearchBuilder builder = new SearchBuilder(rankProfileRegistry);
+ SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry);
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -196,7 +196,7 @@ public class RankingExpressionTypeResolverTestCase {
));
builder.build();
RankProfile profile =
- builder.getRankProfileRegistry().get(builder.getSearch(), "my_rank_profile");
+ builder.getRankProfileRegistry().get(builder.getSchema(), "my_rank_profile");
assertEquals(TensorType.fromSpec("tensor(x[10],y[3])"),
summaryFeatures(profile).get("macro1(a)").type(profile.typeContext(builder.getQueryProfileRegistry())));
assertEquals(TensorType.fromSpec("tensor(z[10])"),
@@ -205,7 +205,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void testTensorFunctionInvocationTypes_Nested() throws Exception {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -238,7 +238,7 @@ public class RankingExpressionTypeResolverTestCase {
));
builder.build();
RankProfile profile =
- builder.getRankProfileRegistry().get(builder.getSearch(), "my_rank_profile");
+ builder.getRankProfileRegistry().get(builder.getSchema(), "my_rank_profile");
assertEquals(TensorType.fromSpec("tensor(x[10],y[1])"),
summaryFeatures(profile).get("return_a").type(profile.typeContext(builder.getQueryProfileRegistry())));
assertEquals(TensorType.fromSpec("tensor(z[10])"),
@@ -247,7 +247,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void testAttributeInvocationViaBoundIdentifier() throws Exception {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search newsarticle {",
" document newsarticle {",
@@ -281,12 +281,12 @@ public class RankingExpressionTypeResolverTestCase {
" }",
"}"));
builder.build();
- RankProfile profile = builder.getRankProfileRegistry().get(builder.getSearch(), "eurank");
+ RankProfile profile = builder.getRankProfileRegistry().get(builder.getSchema(), "eurank");
}
@Test
public void testTensorFunctionInvocationTypes_NestedSameName() throws Exception {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -322,7 +322,7 @@ public class RankingExpressionTypeResolverTestCase {
));
builder.build();
RankProfile profile =
- builder.getRankProfileRegistry().get(builder.getSearch(), "my_rank_profile");
+ builder.getRankProfileRegistry().get(builder.getSchema(), "my_rank_profile");
assertEquals(TensorType.fromSpec("tensor(x[10],y[1])"),
summaryFeatures(profile).get("return_a").type(profile.typeContext(builder.getQueryProfileRegistry())));
assertEquals(TensorType.fromSpec("tensor(z[10])"),
@@ -331,7 +331,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void testTensorFunctionInvocationTypes_viaFuncWithExpr() throws Exception {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search test {",
" document test {",
@@ -346,14 +346,14 @@ public class RankingExpressionTypeResolverTestCase {
" }",
"}"));
builder.build();
- RankProfile profile = builder.getRankProfileRegistry().get(builder.getSearch(), "test");
+ RankProfile profile = builder.getRankProfileRegistry().get(builder.getSchema(), "test");
assertEquals(TensorType.fromSpec("tensor<float>(y{})"),
summaryFeatures(profile).get("test_func_via_func_with_expr").type(profile.typeContext(builder.getQueryProfileRegistry())));
}
@Test
public void importedFieldsAreAvailable() throws Exception {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
builder.importString(joinLines(
"search parent {",
" document parent {",
@@ -384,7 +384,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void undeclaredQueryFeaturesAreAccepted() throws Exception {
InspectableDeployLogger logger = new InspectableDeployLogger();
- SearchBuilder builder = new SearchBuilder(logger);
+ SchemaBuilder builder = new SchemaBuilder(logger);
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -410,7 +410,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void undeclaredQueryFeaturesAreAcceptedWithWarningWhenUsingTensors() throws Exception {
InspectableDeployLogger logger = new InspectableDeployLogger();
- SearchBuilder builder = new SearchBuilder(logger);
+ SchemaBuilder builder = new SchemaBuilder(logger);
builder.importString(joinLines(
"search test {",
" document test { ",
@@ -439,7 +439,7 @@ public class RankingExpressionTypeResolverTestCase {
@Test
public void noWarningWhenUsingTensorsWhenQueryFeaturesAreDeclared() throws Exception {
InspectableDeployLogger logger = new InspectableDeployLogger();
- SearchBuilder builder = new SearchBuilder(logger);
+ SchemaBuilder builder = new SchemaBuilder(logger);
QueryProfileType myType = new QueryProfileType("mytype");
myType.addField(new FieldDescription("rank.feature.query(foo)",
new TensorFieldType(TensorType.fromSpec("tensor(d[2])"))),
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTransformerTokensTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTransformerTokensTestCase.java
index e77787e22ca..93de116883a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTransformerTokensTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTransformerTokensTestCase.java
@@ -9,7 +9,7 @@ import com.yahoo.search.query.profile.QueryProfileRegistry;
import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.expressiontransforms.RankProfileTransformContext;
import com.yahoo.searchdefinition.expressiontransforms.TokenTransformer;
import com.yahoo.searchdefinition.parser.ParseException;
@@ -87,10 +87,10 @@ public class RankingExpressionWithTransformerTokensTestCase {
" document test {}\n" +
" rank-profile my_profile inherits default {}\n" +
"}";
- SearchBuilder searchBuilder = new SearchBuilder(application, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
- searchBuilder.importString(sdContent);
- searchBuilder.build();
- Schema schema = searchBuilder.getSearch();
+ SchemaBuilder schemaBuilder = new SchemaBuilder(application, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
+ schemaBuilder.importString(sdContent);
+ schemaBuilder.build();
+ Schema schema = schemaBuilder.getSchema();
RankProfile rp = rankProfileRegistry.get(schema, "my_profile");
return new RankProfileTransformContext(rp, queryProfileRegistry, Collections.emptyMap(), null, Collections.emptyMap(), Collections.emptyMap());
}
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 fc5a2b6a39a..ebc8ceacc50 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
@@ -11,7 +11,7 @@ import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.derived.DerivedConfiguration;
import com.yahoo.searchdefinition.derived.AttributeFields;
import com.yahoo.searchdefinition.derived.RawRankProfile;
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertTrue;
public class RankingExpressionsTestCase extends AbstractSchemaTestCase {
private static Schema createSearch(String dir, ModelContext.Properties deployProperties, RankProfileRegistry rankProfileRegistry) throws IOException, ParseException {
- return SearchBuilder.createFromDirectory(dir, new MockFileRegistry(), new TestableDeployLogger(), deployProperties, rankProfileRegistry).getSearch();
+ return SchemaBuilder.createFromDirectory(dir, new MockFileRegistry(), new TestableDeployLogger(), deployProperties, rankProfileRegistry).getSchema();
}
@Test
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java
index 41b9d480921..e8564d0875d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReferenceFieldTestCase.java
@@ -6,7 +6,7 @@ import com.yahoo.document.Field;
import com.yahoo.document.ReferenceDataType;
import com.yahoo.searchdefinition.DocumentGraphValidator;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.document.SDDocumentType;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Rule;
@@ -28,7 +28,7 @@ public class ReferenceFieldTestCase {
@Test
public void reference_fields_are_parsed_from_search_definition() throws ParseException {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
String campaignSdContent =
"search campaign {\n" +
" document campaign {\n" +
@@ -50,14 +50,14 @@ public class ReferenceFieldTestCase {
builder.importString(salespersonSdContent);
builder.importString(adSdContent);
builder.build();
- Schema schema = builder.getSearch("ad");
+ Schema schema = builder.getSchema("ad");
assertSearchContainsReferenceField("campaign_ref", "campaign", schema.getDocument());
assertSearchContainsReferenceField("salesperson_ref", "salesperson", schema.getDocument());
}
@Test
public void cyclic_document_dependencies_are_detected() throws ParseException {
- SearchBuilder builder = new SearchBuilder();
+ SchemaBuilder builder = new SchemaBuilder();
String campaignSdContent =
"search campaign {\n" +
" document campaign {\n" +
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReservedRankingExpressionFunctionNamesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReservedRankingExpressionFunctionNamesTestCase.java
index 481acace535..922680e8f1a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReservedRankingExpressionFunctionNamesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ReservedRankingExpressionFunctionNamesTestCase.java
@@ -3,7 +3,7 @@ package com.yahoo.searchdefinition.processing;
import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.searchdefinition.RankProfileRegistry;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -21,7 +21,7 @@ public class ReservedRankingExpressionFunctionNamesTestCase {
public void requireThatFunctionsWithReservedNamesIssueAWarning() throws ParseException {
TestDeployLogger deployLogger = new TestDeployLogger();
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
- SearchBuilder builder = new SearchBuilder(deployLogger, rankProfileRegistry);
+ SchemaBuilder builder = new SchemaBuilder(deployLogger, rankProfileRegistry);
builder.importString(
"search test {\n" +
" document test { \n" +
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/SchemaMustHaveDocumentTest.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/SchemaMustHaveDocumentTest.java
index 34572280d01..24dc98e4d93 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/SchemaMustHaveDocumentTest.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/SchemaMustHaveDocumentTest.java
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.processing;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -17,7 +17,7 @@ public class SchemaMustHaveDocumentTest {
@Test
public void requireErrorWhenMissingDocument() throws IOException, ParseException {
try {
- SearchBuilder.buildFromFile("src/test/examples/invalid_sd_missing_document.sd");
+ SchemaBuilder.buildFromFile("src/test/examples/invalid_sd_missing_document.sd");
fail("SD without document");
} catch (IllegalArgumentException e) {
if (!e.getMessage()
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryConsistencyTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryConsistencyTestCase.java
index e0593aef1e3..145295a7c49 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryConsistencyTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryConsistencyTestCase.java
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.documentmodel.SummaryTransform;
import org.junit.Test;
@@ -39,7 +39,7 @@ public class SummaryConsistencyTestCase {
"",
"}"
);
- Schema schema = SearchBuilder.createFromString(sd).getSearch();
+ Schema schema = SchemaBuilder.createFromString(sd).getSchema();
assertEquals(SummaryTransform.ATTRIBUTECOMBINER, schema.getSummaryField("elem_array_unfiltered").getTransform());
}
}
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 014ca4ec5e9..eb3e61b9f7a 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
@@ -5,7 +5,7 @@ import com.yahoo.config.model.application.provider.BaseDeployLogger;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
@@ -21,7 +21,7 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends AbstractSchemaTest
@Test
public void requireThatInvalidSourceIsCaught() throws IOException, ParseException {
try {
- SearchBuilder.buildFromFile("src/test/examples/invalidsummarysource.sd");
+ SchemaBuilder.buildFromFile("src/test/examples/invalidsummarysource.sd");
fail("This should throw and never get here");
} catch (IllegalArgumentException e) {
assertEquals("For schema 'invalidsummarysource', summary class 'baz', summary field 'cox': there is no valid source 'nonexistingfield'.", e.getMessage());
@@ -31,7 +31,7 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends AbstractSchemaTest
@Test
public void requireThatInvalidImplicitSourceIsCaught() throws IOException, ParseException {
try {
- SearchBuilder.buildFromFile("src/test/examples/invalidimplicitsummarysource.sd");
+ SchemaBuilder.buildFromFile("src/test/examples/invalidimplicitsummarysource.sd");
fail("This should throw and never get here");
} catch (IllegalArgumentException e) {
assertEquals("For schema 'invalidsummarysource', summary class 'baz', summary field 'cox': there is no valid source 'cox'.", e.getMessage());
@@ -41,7 +41,7 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends AbstractSchemaTest
@Test
public void requireThatInvalidSelfReferingSingleSource() throws IOException, ParseException {
try {
- SearchBuilder.buildFromFile("src/test/examples/invalidselfreferringsummary.sd");
+ SchemaBuilder.buildFromFile("src/test/examples/invalidselfreferringsummary.sd");
fail("This should throw and never get here");
} catch (IllegalArgumentException e) {
assertEquals("For schema 'invalidselfreferringsummary', summary class 'withid', summary field 'w': there is no valid source 'w'.", e.getMessage());
@@ -50,7 +50,7 @@ public class SummaryFieldsMustHaveValidSourceTestCase extends AbstractSchemaTest
@Test
public void requireThatDocumentIdIsAllowedToPass() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/documentidinsummary.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/documentidinsummary.sd");
BaseDeployLogger deployLogger = new BaseDeployLogger();
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
new SummaryFieldsMustHaveValidSource(schema, deployLogger, rankProfileRegistry, new QueryProfiles()).process(true, false);
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java
index cef00346fe7..82b288dc66d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java
@@ -1,13 +1,12 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.processing;
-import com.yahoo.config.model.test.TestUtil;
import com.yahoo.searchdefinition.document.Attribute;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
-import static com.yahoo.searchdefinition.SearchBuilder.createFromString;
+import static com.yahoo.searchdefinition.SchemaBuilder.createFromString;
import static com.yahoo.config.model.test.TestUtil.joinLines;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -138,12 +137,12 @@ public class TensorFieldTestCase {
}
private Attribute getAttributeFromSd(String fieldSpec, String attrName) throws ParseException {
- return createFromString(getSd(fieldSpec)).getSearch().getAttribute(attrName);
+ return createFromString(getSd(fieldSpec)).getSchema().getAttribute(attrName);
}
private void assertHnswIndexParams(String indexSpec, int maxLinksPerNode, int neighborsToExploreAtInsert) throws ParseException {
var sd = getSdWithIndexSpec(indexSpec);
- var search = createFromString(sd).getSearch();
+ var search = createFromString(sd).getSchema();
var attr = search.getAttribute("t1");
var params = attr.hnswIndexParams();
assertTrue(params.isPresent());
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 888cd22c1c3..eec2ef4c3a0 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
@@ -14,7 +14,7 @@ import com.yahoo.searchdefinition.LargeRankExpressions;
import com.yahoo.searchdefinition.RankProfile;
import com.yahoo.searchdefinition.RankProfileRegistry;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.derived.AttributeFields;
import com.yahoo.searchdefinition.derived.RawRankProfile;
@@ -140,7 +140,7 @@ public class TensorTransformTestCase extends AbstractSchemaTestCase {
private List<Pair<String, String>> buildSearch(String expression) throws ParseException {
RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
QueryProfileRegistry queryProfiles = setupQueryProfileTypes();
- SearchBuilder builder = new SearchBuilder(rankProfileRegistry, queryProfiles);
+ SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry, queryProfiles);
builder.importString(
"search test {\n" +
" document test { \n" +
@@ -198,7 +198,7 @@ public class TensorTransformTestCase extends AbstractSchemaTestCase {
" }\n" +
"}\n");
builder.build(true);
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(queryProfiles, new ImportedMlModels());
List<Pair<String, String>> testRankProperties = new RawRankProfile(test,
new LargeRankExpressions(new MockFileRegistry()),
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 e9aec9b7293..2a737f4eb69 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
@@ -2,7 +2,7 @@
package com.yahoo.searchdefinition.processing;
import com.yahoo.searchdefinition.Schema;
-import com.yahoo.searchdefinition.SearchBuilder;
+import com.yahoo.searchdefinition.SchemaBuilder;
import com.yahoo.searchdefinition.AbstractSchemaTestCase;
import com.yahoo.searchdefinition.parser.ParseException;
import org.junit.Test;
@@ -16,7 +16,7 @@ public class WeightedSetSummaryToTestCase extends AbstractSchemaTestCase {
@Test
public void testRequireThatImplicitFieldsAreCreated() throws IOException, ParseException {
- Schema schema = SearchBuilder.buildFromFile("src/test/examples/weightedset-summaryto.sd");
+ Schema schema = SchemaBuilder.buildFromFile("src/test/examples/weightedset-summaryto.sd");
assertNotNull(schema);
}