summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-10-25 18:12:58 +0200
committerJon Bratseth <bratseth@gmail.com>2021-10-25 18:12:58 +0200
commitc95477e05205f8bc034842ddc03dbde08f249596 (patch)
tree799196bef2ec5277da5bc1bccac4d8d493eda22a
parent54cb8fd6a7d361741ce1decc097d6d43ec3a87d2 (diff)
Cleanup
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/SearchDocumentModel.java4
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/SchemaBuilder.java110
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/DiversityTestCase.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/PredicateDataTypeTestCase.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java6
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingConstantTest.java12
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java12
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java8
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java8
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SchemaImporterTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/AbstractExportingTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/AttributeListTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/EmptyRankProfileTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java8
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/SchemaInheritanceTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/SimpleInheritTestCase.java2
-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.java8
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/TwoStreamingStructsTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/document/ComplexAttributeFieldUtilsTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSchemaFieldsTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImportedFieldsTestCase.java12
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/MatchedElementsOnlyResolverTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionTypeResolverTestCase.java10
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionWithTransformerTokensTestCase.java2
-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/ReferenceFieldTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/SummaryConsistencyTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/test/SchemaClusterTest.java4
-rw-r--r--vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java2
42 files changed, 136 insertions, 140 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/SearchDocumentModel.java b/config-model/src/main/java/com/yahoo/config/model/deploy/SearchDocumentModel.java
index b7a44ef2c73..aaba9a2b98c 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/SearchDocumentModel.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/SearchDocumentModel.java
@@ -36,7 +36,7 @@ public class SearchDocumentModel {
public static SearchDocumentModel fromBuilderAndNames(SchemaBuilder builder, Map<String, String> names) {
List<NamedSchema> ret = new ArrayList<>();
- for (Schema schema : builder.getSearchList()) {
+ for (Schema schema : builder.getSchemaList()) {
ret.add(new NamedSchema(names.get(schema.getName()), schema));
}
return new SearchDocumentModel(builder.getModel(), ret);
@@ -44,7 +44,7 @@ public class SearchDocumentModel {
public static SearchDocumentModel fromBuilder(SchemaBuilder builder) {
List<NamedSchema> ret = new ArrayList<>();
- for (Schema schema : builder.getSearchList()) {
+ for (Schema schema : builder.getSchemaList()) {
ret.add(new NamedSchema(schema.getName(), schema));
}
return new SearchDocumentModel(builder.getModel(), ret);
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/SchemaBuilder.java b/config-model/src/main/java/com/yahoo/searchdefinition/SchemaBuilder.java
index ae849b0b538..76385a87d83 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/SchemaBuilder.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/SchemaBuilder.java
@@ -35,15 +35,14 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import java.util.Set;
/**
- * Helper class for importing {@link Schema} objects in an unambiguous way. The pattern for using this is to 1) Import
+ * Helper class for building {@link Schema}s. The pattern for using this is to 1) Import
* all available search definitions, using the importXXX() methods, 2) provide the available rank types and rank
* expressions, using the setRankXXX() methods, 3) invoke the {@link #build()} method, and 4) retrieve the built
- * search objects using the {@link #getSearch(String)} method.
+ * search objects using the {@link #getSchema(String)} method.
*/
// NOTE: Since this was created we have added Application, and much of the content in this should migrate there.
public class SchemaBuilder {
@@ -161,9 +160,9 @@ public class SchemaBuilder {
/**
* Import search definition.
*
- * @param str the string to parse.
- * @return the name of the imported object.
- * @throws ParseException thrown if the file does not contain a valid search definition.
+ * @param str the string to parse
+ * @return the name of the imported object
+ * @throws ParseException thrown if the file does not contain a valid search definition
*/
public String importString(String str) throws ParseException {
return importString(str, null);
@@ -172,7 +171,7 @@ public class SchemaBuilder {
private String importString(String str, String searchDefDir) throws ParseException {
SimpleCharStream stream = new SimpleCharStream(str);
try {
- return importRawSearch(new SDParser(stream, fileRegistry, deployLogger, properties, application,
+ return importRawSchema(new SDParser(stream, fileRegistry, deployLogger, properties, application,
application.rankProfileRegistry(), documentsOnly)
.schema(docTypeMgr, searchDefDir));
} catch (TokenMgrException e) {
@@ -183,15 +182,15 @@ public class SchemaBuilder {
}
/**
- * Registers the given search object to the internal list of objects to be processed during {@link #build()}. A
+ * Registers the given schema to the application to be built during {@link #build()}. A
* {@link Schema} object is considered to be "raw" if it has not already been processed. This is the case for most
- * programmatically constructed search objects used in unit tests.
+ * programmatically constructed schemas used in unit tests.
*
- * @param schema the object to import.
- * @return the name of the imported object.
- * @throws IllegalArgumentException if the given search object has already been processed.
+ * @param schema the object to import
+ * @return the name of the imported object
+ * @throws IllegalArgumentException if the given search object has already been processed
*/
- public String importRawSearch(Schema schema) {
+ public String importRawSchema(Schema schema) {
if (schema.getName() == null)
throw new IllegalArgumentException("Schema has no name");
String rawName = schema.getName();
@@ -200,11 +199,9 @@ public class SchemaBuilder {
}
/**
+ * Processes and finalizes the schemas of this.
* Only for testing.
*
- * Processes and finalizes the imported search definitions so that they become available through the {@link
- * #getSearch(String)} method.
- *
* @throws IllegalStateException Thrown if this method has already been called.
*/
public void build() {
@@ -212,13 +209,12 @@ public class SchemaBuilder {
}
/**
- * Processes and finalizes the imported search definitions so that they become available through the {@link
- * #getSearch(String)} method.
+ * Processes and finalizes the schemas of this.
*
* @throws IllegalStateException thrown if this method has already been called
*/
public void build(boolean validate) {
- if (isBuilt) throw new IllegalStateException("Model already built");
+ if (isBuilt) throw new IllegalStateException("Application already built");
if (validate)
application.validate(deployLogger);
@@ -270,14 +266,14 @@ public class SchemaBuilder {
}
/**
- * Convenience method to call {@link #getSearch(String)} when there is only a single {@link Schema} object
+ * Convenience method to call {@link #getSchema(String)} when there is only a single {@link Schema} object
* built. This method will never return null.
*
* @return the built object
* @throws IllegalStateException if there is not exactly one search.
*/
- public Schema getSearch() {
- if ( ! isBuilt) throw new IllegalStateException("Searches not built.");
+ public Schema getSchema() {
+ if ( ! isBuilt) throw new IllegalStateException("Application not built.");
if (application.schemas().size() != 1)
throw new IllegalStateException("This call only works if we have 1 schema. Schemas: " +
application.schemas().values());
@@ -293,14 +289,14 @@ public class SchemaBuilder {
* Returns the built {@link Schema} object that has the given name. If the name is unknown, this method will simply
* return null.
*
- * @param name the name of the search definition to return,
+ * @param name the name of the schema to return,
* or null to return the only one or throw an exception if there are multiple to choose from
* @return the built object, or null if none with this name
* @throws IllegalStateException if {@link #build()} has not been called.
*/
- public Schema getSearch(String name) {
- if ( ! isBuilt) throw new IllegalStateException("Searches not built.");
- if (name == null) return getSearch();
+ public Schema getSchema(String name) {
+ if ( ! isBuilt) throw new IllegalStateException("Application not built.");
+ if (name == null) return getSchema();
return application.schemas().get(name);
}
@@ -311,16 +307,16 @@ public class SchemaBuilder {
*
* @return the list of built searches
*/
- public List<Schema> getSearchList() {
+ public List<Schema> getSchemaList() {
return new ArrayList<>(application.schemas().values());
}
/**
* Convenience factory method to import and build a {@link Schema} object from a string.
*
- * @param sd The string to build from.
- * @return The built {@link SchemaBuilder} object.
- * @throws ParseException Thrown if there was a problem parsing the string.
+ * @param sd the string to build from
+ * @return the built {@link SchemaBuilder} object
+ * @throws ParseException thrown if there is a problem parsing the string
*/
public static SchemaBuilder createFromString(String sd) throws ParseException {
return createFromString(sd, new BaseDeployLogger());
@@ -462,10 +458,10 @@ public class SchemaBuilder {
/**
* Convenience factory method to import and build a {@link Schema} object from a file. Only for testing.
*
- * @param fileName The file to build from.
- * @return The built {@link Schema} object.
- * @throws IOException Thrown if there was a problem reading the file.
- * @throws ParseException Thrown if there was a problem parsing the file content.
+ * @param fileName the file to build from
+ * @return the built {@link Schema} object
+ * @throws IOException thrown if there was a problem reading the file
+ * @throws ParseException thrown if there was a problem parsing the file content
*/
public static Schema buildFromFile(String fileName) throws IOException, ParseException {
return buildFromFile(fileName, new BaseDeployLogger(), new RankProfileRegistry(), new QueryProfileRegistry());
@@ -474,11 +470,11 @@ public class SchemaBuilder {
/**
* Convenience factory method to import and build a {@link Schema} object from a file.
*
- * @param fileName The file to build from.
- * @param rankProfileRegistry Registry for rank profiles.
- * @return The built {@link Schema} object.
- * @throws IOException Thrown if there was a problem reading the file.
- * @throws ParseException Thrown if there was a problem parsing the file content.
+ * @param fileName the file to build from
+ * @param rankProfileRegistry registry for rank profiles
+ * @return the built {@link Schema} object
+ * @throws IOException thrown if there was a problem reading the file
+ * @throws ParseException thrown if there was a problem parsing the file content
*/
public static Schema buildFromFile(String fileName,
RankProfileRegistry rankProfileRegistry,
@@ -488,35 +484,35 @@ public class SchemaBuilder {
}
/**
- * Convenience factory method to import and build a {@link Schema} object from a file.
+ * Convenience factory method to import and build a {@link Schema} from a file.
*
- * @param fileName The file to build from.
- * @param deployLogger Logger for deploy messages.
- * @param rankProfileRegistry Registry for rank profiles.
- * @return The built {@link Schema} object.
- * @throws IOException Thrown if there was a problem reading the file.
- * @throws ParseException Thrown if there was a problem parsing the file content.
+ * @param fileName the file to build from
+ * @param deployLogger logger for deploy messages
+ * @param rankProfileRegistry registry for rank profiles
+ * @return the built {@link Schema} object
+ * @throws IOException thrown if there was a problem reading the file
+ * @throws ParseException thrown if there was a problem parsing the file content
*/
public static Schema buildFromFile(String fileName,
DeployLogger deployLogger,
RankProfileRegistry rankProfileRegistry,
QueryProfileRegistry queryProfileRegistry)
throws IOException, ParseException {
- return createFromFile(fileName, deployLogger, rankProfileRegistry, queryProfileRegistry).getSearch();
+ return createFromFile(fileName, deployLogger, rankProfileRegistry, queryProfileRegistry).getSchema();
}
/**
* Convenience factory method to import and build a {@link Schema} object from a raw object.
*
- * @param rawSchema the raw object to build from.
- * @return the built {@link SchemaBuilder} object.
- * @see #importRawSearch(Schema)
+ * @param rawSchema the raw object to build from
+ * @return the built {@link SchemaBuilder} object
+ * @see #importRawSchema(Schema)
*/
- public static SchemaBuilder createFromRawSearch(Schema rawSchema,
+ public static SchemaBuilder createFromRawSchema(Schema rawSchema,
RankProfileRegistry rankProfileRegistry,
QueryProfileRegistry queryProfileRegistry) {
SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry, queryProfileRegistry);
- builder.importRawSearch(rawSchema);
+ builder.importRawSchema(rawSchema);
builder.build();
return builder;
}
@@ -524,14 +520,14 @@ public class SchemaBuilder {
/**
* Convenience factory method to import and build a {@link Schema} object from a raw object.
*
- * @param rawSchema The raw object to build from.
- * @return The built {@link Schema} object.
- * @see #importRawSearch(Schema)
+ * @param rawSchema the raw object to build from
+ * @return the built {@link Schema} object
+ * @see #importRawSchema(Schema)
*/
- public static Schema buildFromRawSearch(Schema rawSchema,
+ public static Schema buildFromRawSchema(Schema rawSchema,
RankProfileRegistry rankProfileRegistry,
QueryProfileRegistry queryProfileRegistry) {
- return createFromRawSearch(rawSchema, rankProfileRegistry, queryProfileRegistry).getSearch();
+ return createFromRawSchema(rawSchema, rankProfileRegistry, queryProfileRegistry).getSchema();
}
public RankProfileRegistry getRankProfileRegistry() {
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 d1179451308..8656e740333 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/AttributeSettingsTestCase.java
@@ -104,7 +104,7 @@ public class AttributeSettingsTestCase extends AbstractSchemaTestCase {
SchemaBuilder builder = new SchemaBuilder();
builder.importString(sd);
builder.build();
- return builder.getSearch();
+ return builder.getSchema();
}
private Attribute getAttributeF(String sd) throws ParseException {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/DiversityTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/DiversityTestCase.java
index 58cdbdc1bf9..7c5c5c6fccc 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/DiversityTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/DiversityTestCase.java
@@ -43,7 +43,7 @@ public class DiversityTestCase {
" }\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile.MatchPhaseSettings matchPhase = rankProfileRegistry.get(s, "parent").getMatchPhaseSettings();
RankProfile.DiversitySettings diversity = matchPhase.getDiversity();
assertEquals("b", diversity.getAttribute());
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 2107781b5fa..f2e50439306 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/IndexSettingsTestCase.java
@@ -52,7 +52,7 @@ public class IndexSettingsTestCase extends AbstractSchemaTestCase {
" }",
"}"
));
- Schema schema = builder.getSearch();
+ Schema schema = builder.getSchema();
Index contentIndex = schema.getIndex("content");
assertTrue(contentIndex.useInterleavedFeatures());
Index extraIndex = schema.getIndex("extra");
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/PredicateDataTypeTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/PredicateDataTypeTestCase.java
index a41d4388bce..a3dd45a629f 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/PredicateDataTypeTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/PredicateDataTypeTestCase.java
@@ -65,7 +65,7 @@ public class PredicateDataTypeTestCase {
upperBoundParameter(upperBound))));
SchemaBuilder sb = SchemaBuilder.createFromString(sd);
- for (ImmutableSDField field : sb.getSearch().allConcreteFields()) {
+ for (ImmutableSDField field : sb.getSchema().allConcreteFields()) {
if (field.getDataType() == DataType.PREDICATE) {
for (Index index : field.getIndices().values()) {
assertTrue(index.getBooleanIndexDefiniton().hasArity());
@@ -92,7 +92,7 @@ public class PredicateDataTypeTestCase {
upperBoundParameter(upperBound))));
SchemaBuilder sb = SchemaBuilder.createFromString(sd);
- for (ImmutableSDField field : sb.getSearch().allConcreteFields()) {
+ for (ImmutableSDField field : sb.getSchema().allConcreteFields()) {
if (field.getDataType() == DataType.PREDICATE) {
for (Index index : field.getIndices().values()) {
assertEquals(arity, index.getBooleanIndexDefiniton().getArity());
@@ -110,7 +110,7 @@ public class PredicateDataTypeTestCase {
attributeFieldSd(
arityParameter(2))));
SchemaBuilder sb = SchemaBuilder.createFromString(sd);
- for (ImmutableSDField field : sb.getSearch().allConcreteFields()) {
+ for (ImmutableSDField field : sb.getSchema().allConcreteFields()) {
if (field.getDataType() == DataType.PREDICATE) {
for (Index index : field.getIndices().values()) {
assertTrue(index.getBooleanIndexDefiniton().hasArity());
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 ed82d2335bf..3fa129eae39 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java
@@ -249,7 +249,7 @@ public class RankProfileTestCase extends AbstractSchemaTestCase {
SchemaBuilder builder = new SchemaBuilder(rankProfileRegistry);
builder.importString(sd);
builder.build();
- Schema schema = builder.getSearch();
+ Schema schema = builder.getSchema();
AttributeFields attributeFields = new AttributeFields(schema);
verifyRankProfile(rankProfileRegistry.get(schema, "parent"), attributeFields, deployProperties, termwiseLimit);
verifyRankProfile(rankProfileRegistry.get(schema, "child"), attributeFields, deployProperties, termwiseLimit);
@@ -291,7 +291,7 @@ public class RankProfileTestCase extends AbstractSchemaTestCase {
" rank-profile p2 {}",
"}"));
builder.build();
- Schema schema = builder.getSearch();
+ Schema schema = builder.getSchema();
assertEquals(4, registry.all().size());
assertAttributeTypeSettings(registry.get(schema, "default"), schema);
@@ -340,7 +340,7 @@ public class RankProfileTestCase extends AbstractSchemaTestCase {
" rank-profile p2 {}",
"}"));
builder.build(true);
- Schema schema = builder.getSearch();
+ Schema schema = builder.getSchema();
assertEquals(4, registry.all().size());
assertQueryFeatureTypeSettings(registry.get(schema, "default"), schema);
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 0d940ed30bd..20fd5444477 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankPropertiesTestCase.java
@@ -49,7 +49,7 @@ public class RankPropertiesTestCase extends AbstractSchemaTestCase {
" }",
"}"));
builder.build();
- Schema schema = builder.getSearch();
+ Schema schema = builder.getSchema();
AttributeFields attributeFields = new AttributeFields(schema);
{
@@ -129,7 +129,7 @@ public class RankPropertiesTestCase extends AbstractSchemaTestCase {
" }",
"}"));
builder.build();
- Schema schema = builder.getSearch();
+ Schema schema = builder.getSchema();
RankProfile a = rankProfileRegistry.get(schema, "a");
List<RankProfile.MutateOperation> operations = a.getMutateOperations();
assertEquals(4, operations.size());
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankingConstantTest.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankingConstantTest.java
index 4f4a8db18c4..7951962a8bd 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingConstantTest.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingConstantTest.java
@@ -43,7 +43,7 @@ public class RankingConstantTest {
"}"
));
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ Schema schema = schemaBuilder.getSchema();
Iterator<RankingConstant> constantIterator = schema.rankingConstants().asMap().values().iterator();
RankingConstant constant = constantIterator.next();
@@ -101,7 +101,7 @@ public class RankingConstantTest {
"}"
));
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ Schema schema = schemaBuilder.getSchema();
RankingConstant constant = schema.rankingConstants().asMap().values().iterator().next();
assertEquals("simplename", constant.getFileName());
}
@@ -120,7 +120,7 @@ public class RankingConstantTest {
"}"
));
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ Schema schema = schemaBuilder.getSchema();
RankingConstant constant = schema.rankingConstants().asMap().values().iterator().next();
assertEquals(RankingConstant.PathType.URI, constant.getPathType());
assertEquals("http://somewhere.far.away/in/another-galaxy", constant.getUri());
@@ -140,7 +140,7 @@ public class RankingConstantTest {
"}"
));
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ Schema schema = schemaBuilder.getSchema();
RankingConstant constant = schema.rankingConstants().asMap().values().iterator().next();
assertEquals(RankingConstant.PathType.URI, constant.getPathType());
assertEquals("https://somewhere.far.away:4443/in/another-galaxy", constant.getUri());
@@ -160,7 +160,7 @@ public class RankingConstantTest {
"}"
));
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ Schema schema = schemaBuilder.getSchema();
RankingConstant constant = schema.rankingConstants().asMap().values().iterator().next();
assertEquals(RankingConstant.PathType.URI, constant.getPathType());
assertEquals("http://somewhere.far.away:4080/in/another-galaxy", constant.getUri());
@@ -180,7 +180,7 @@ public class RankingConstantTest {
"}"
));
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ Schema schema = schemaBuilder.getSchema();
RankingConstant constant = schema.rankingConstants().asMap().values().iterator().next();
assertEquals(RankingConstant.PathType.URI, constant.getPathType());
assertEquals("http:somewhere.far.away/in/another-galaxy", constant.getUri());
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 988aec84eac..678c2301bc6 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionConstantsTestCase.java
@@ -67,7 +67,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile parent = rankProfileRegistry.get(s, "parent").compile(queryProfileRegistry, new ImportedMlModels());
assertEquals("0.0", parent.getFirstPhaseRanking().getRoot().toString());
@@ -111,7 +111,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
try {
rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels());
fail("Should have caused an exception");
@@ -142,7 +142,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile profile = rankProfileRegistry.get(s, "test");
assertEquals("safeLog(popShareSlowDecaySignal,-9.21034037)", profile.getFunctions().get("POP_SLOW_SCORE").function().getBody().getRoot().toString());
}
@@ -170,7 +170,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile profile = rankProfileRegistry.get(s, "test");
assertEquals("safeLog(popShareSlowDecaySignal,myValue)", profile.getFunctions().get("POP_SLOW_SCORE").function().getBody().getRoot().toString());
assertEquals("safeLog(popShareSlowDecaySignal,-9.21034037)",
@@ -194,7 +194,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile profile = rankProfileRegistry.get(s, "test");
assertEquals("k1 + (k2 + k3) / 100000000.0",
profile.compile(new QueryProfileRegistry(), new ImportedMlModels()).getFunctions().get("rank_default").function().getBody().getRoot().toString());
@@ -220,7 +220,7 @@ public class RankingExpressionConstantsTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile profile = rankProfileRegistry.get(s, "test");
assertEquals("0.5 + 50 * (attribute(rating_yelp) - 3)",
profile.compile(new QueryProfileRegistry(), new ImportedMlModels()).getFunctions().get("rank_default").function().getBody().getRoot().toString());
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 9baa655befc..50c94ff38d4 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionInliningTestCase.java
@@ -66,7 +66,7 @@ public class RankingExpressionInliningTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile parent = rankProfileRegistry.get(s, "parent").compile(new QueryProfileRegistry(), new ImportedMlModels());
assertEquals("7.0 * (3 + attribute(a) + attribute(b) * (attribute(a) * 3 + if (7.0 < attribute(a), 1, 2) == 0))",
@@ -126,7 +126,7 @@ public class RankingExpressionInliningTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile parent = rankProfileRegistry.get(s, "parent").compile(new QueryProfileRegistry(), new ImportedMlModels());
assertEquals("17.0", parent.getFirstPhaseRanking().getRoot().toString());
@@ -182,7 +182,7 @@ public class RankingExpressionInliningTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels());
assertEquals("attribute(a) + C + (attribute(b) + 1)", test.getFirstPhaseRanking().getRoot().toString());
@@ -216,7 +216,7 @@ public class RankingExpressionInliningTestCase extends AbstractSchemaTestCase {
" }\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels());
assertEquals("foo(2)", test.getFirstPhaseRanking().getRoot().toString());
assertTrue("Does not contain expected warning", deployLogger.contains("Function 'foo' replaces " +
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 8cea119be11..ff146fedd88 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionShadowingTestCase.java
@@ -46,7 +46,7 @@ public class RankingExpressionShadowingTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels());
List<Pair<String, String>> testRankProperties = createRawRankProfile(test, new QueryProfileRegistry(), s).configProperties();
assertEquals("(rankingExpression(sin@).rankingScript, 2 * 2)",
@@ -87,7 +87,7 @@ public class RankingExpressionShadowingTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels());
List<Pair<String, String>> testRankProperties = createRawRankProfile(test, new QueryProfileRegistry(), s).configProperties();
assertEquals("(rankingExpression(tan@).rankingScript, 2 * 2)",
@@ -133,7 +133,7 @@ public class RankingExpressionShadowingTestCase extends AbstractSchemaTestCase {
"\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(new QueryProfileRegistry(), new ImportedMlModels());
List<Pair<String, String>> testRankProperties = createRawRankProfile(test, new QueryProfileRegistry(), s).configProperties();
assertEquals("(rankingExpression(sin@).rankingScript, 4.0 * 4.0)",
@@ -194,7 +194,7 @@ public class RankingExpressionShadowingTestCase extends AbstractSchemaTestCase {
" }\n" +
"}\n");
builder.build();
- Schema s = builder.getSearch();
+ Schema s = builder.getSchema();
RankProfile test = rankProfileRegistry.get(s, "test").compile(queryProfiles, new ImportedMlModels());
List<Pair<String, String>> testRankProperties = createRawRankProfile(test, queryProfiles, s).configProperties();
assertEquals("(rankingExpression(autogenerated_ranking_feature@).rankingScript, reduce(query(q) * constant(W_hidden), sum, input) + constant(b_input))",
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 64873a76179..299724ea39e 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankingExpressionValidationTestCase.java
@@ -46,7 +46,7 @@ public class RankingExpressionValidationTestCase extends AbstractSchemaTestCase
" }" +
"}");
builder.build();
- return builder.getSearch();
+ return builder.getSchema();
}
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaImporterTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SchemaImporterTestCase.java
index e26b588c74e..c2816336076 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SchemaImporterTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SchemaImporterTestCase.java
@@ -39,7 +39,7 @@ public class SchemaImporterTestCase extends AbstractSchemaTestCase {
SchemaBuilder sb = new SchemaBuilder(rankProfileRegistry, new QueryProfileRegistry());
sb.importFile("src/test/examples/simple.sd");
sb.build();
- Schema schema = sb.getSearch();
+ Schema schema = sb.getSchema();
assertEquals("simple", schema.getName());
assertTrue(schema.hasDocument());
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java
index 22079b740a3..ba1795db406 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SummaryTestCase.java
@@ -156,7 +156,7 @@ public class SummaryTestCase {
" }",
"}");
var logger = new DeployLoggerStub();
- var search = SchemaBuilder.createFromString(sd, logger).getSearch();
+ var search = SchemaBuilder.createFromString(sd, logger).getSchema();
assertEquals(List.of(), logger.entries);
var titleField = "title";
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 b452d5b883d..da14e4a8929 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
@@ -45,7 +45,7 @@ public abstract class AbstractExportingTestCase extends AbstractSchemaTestCase {
TestProperties properties,
SchemaBuilder builder,
DeployLogger logger) throws IOException {
- DerivedConfiguration config = new DerivedConfiguration(builder.getSearch(searchDefinitionName),
+ DerivedConfiguration config = new DerivedConfiguration(builder.getSchema(searchDefinitionName),
logger,
properties,
builder.getRankProfileRegistry(),
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 fd22338f6ea..58a4350b73b 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
@@ -108,7 +108,7 @@ public class AttributeListTestCase extends AbstractSchemaTestCase {
" indexing: attribute",
" }",
" }",
- "}")).getSearch();
+ "}")).getSchema();
Iterator<Attribute> attributes = new AttributeFields(schema).attributeIterator();
assertAttribute("pos_array_zcurve", Attribute.Type.LONG, Attribute.CollectionType.ARRAY, true, attributes.next());
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 4235e1e6f4e..604082fb52e 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
@@ -30,7 +30,7 @@ public class EmptyRankProfileTestCase extends AbstractSchemaTestCase {
doc.addField(field);
doc.addField(new SDField("c", DataType.STRING));
- schema = SchemaBuilder.buildFromRawSearch(schema, rankProfileRegistry, new QueryProfileRegistry());
+ schema = SchemaBuilder.buildFromRawSchema(schema, rankProfileRegistry, new QueryProfileRegistry());
new DerivedConfiguration(schema, rankProfileRegistry);
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java
index 311332571cc..c6a10c5530b 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/ExportingTestCase.java
@@ -150,7 +150,7 @@ public class ExportingTestCase extends AbstractExportingTestCase {
builder.importFile(dir + "first.sd");
builder.importFile(dir + "second.sd");
builder.build();
- derive("tensor2", builder, builder.getSearch("second"));
+ derive("tensor2", builder, builder.getSchema("second"));
assertCorrectConfigFiles("tensor2");
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java
index b183ccbd320..97cfc48580d 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/InheritanceTestCase.java
@@ -41,7 +41,7 @@ public class InheritanceTestCase extends AbstractExportingTestCase {
builder.importFile(dir + "parent.sd");
builder.importFile(dir + "child.sd");
builder.build();
- derive("inheritstruct", builder, builder.getSearch("child"));
+ derive("inheritstruct", builder, builder.getSchema("child"));
assertCorrectConfigFiles("inheritstruct");
}
@@ -111,7 +111,7 @@ public class InheritanceTestCase extends AbstractExportingTestCase {
builder.importFile(dir + "parent.sd");
builder.importFile(dir + "child.sd");
builder.build();
- derive("inheritfromparent", builder, builder.getSearch("child"));
+ derive("inheritfromparent", builder, builder.getSchema("child"));
assertCorrectConfigFiles("inheritfromparent");
}
@@ -123,7 +123,7 @@ public class InheritanceTestCase extends AbstractExportingTestCase {
builder.importFile(dir + "parent.sd");
builder.importFile(dir + "child.sd");
builder.build();
- derive("inheritfromgrandparent", builder, builder.getSearch("child"));
+ derive("inheritfromgrandparent", builder, builder.getSchema("child"));
assertCorrectConfigFiles("inheritfromgrandparent");
}
@@ -136,7 +136,7 @@ public class InheritanceTestCase extends AbstractExportingTestCase {
builder.importFile(dir + "mother.sd");
builder.importFile(dir + "child.sd");
builder.build();
- derive("inheritance", builder, builder.getSearch("child"));
+ derive("inheritance", builder, builder.getSchema("child"));
assertCorrectConfigFiles("inheritance");
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java
index 01a39facc16..f8f1bf9e4f1 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/LiteralBoostTestCase.java
@@ -73,7 +73,7 @@ public class LiteralBoostTestCase extends AbstractExportingTestCase {
rankProfileRegistry.add(other);
other.addRankSetting(new RankProfile.RankSetting("a", RankProfile.RankSetting.Type.LITERALBOOST, 333));
- schema = SchemaBuilder.buildFromRawSearch(schema, rankProfileRegistry, new QueryProfileRegistry());
+ schema = SchemaBuilder.buildFromRawSchema(schema, rankProfileRegistry, new QueryProfileRegistry());
DerivedConfiguration derived = new DerivedConfiguration(schema, rankProfileRegistry);
// Check il script addition
@@ -100,7 +100,7 @@ public class LiteralBoostTestCase extends AbstractExportingTestCase {
field2.parseIndexingScript("{ summary | index }");
field2.setLiteralBoost(20);
- schema = SchemaBuilder.buildFromRawSearch(schema, rankProfileRegistry, new QueryProfileRegistry());
+ schema = SchemaBuilder.buildFromRawSchema(schema, rankProfileRegistry, new QueryProfileRegistry());
new DerivedConfiguration(schema, rankProfileRegistry);
assertIndexing(Arrays.asList("clear_state | guard { input title | tokenize normalize stem:\"BEST\" | summary title | index title; }",
"clear_state | guard { input body | tokenize normalize stem:\"BEST\" | summary body | index body; }",
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SchemaInheritanceTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SchemaInheritanceTestCase.java
index 86f017790ac..c7297c41c62 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SchemaInheritanceTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SchemaInheritanceTestCase.java
@@ -23,7 +23,7 @@ public class SchemaInheritanceTestCase extends AbstractExportingTestCase {
new MockFileRegistry(),
new TestableDeployLogger(),
new TestProperties());
- derive("schemainheritance", builder, builder.getSearch("child"));
+ derive("schemainheritance", builder, builder.getSchema("child"));
assertCorrectConfigFiles("schemainheritance");
}
finally {
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SimpleInheritTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SimpleInheritTestCase.java
index 31d22c960da..c0f2b6887d2 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/SimpleInheritTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/SimpleInheritTestCase.java
@@ -24,7 +24,7 @@ public class SimpleInheritTestCase extends AbstractExportingTestCase {
builder.importFile(expectedResultsDirName + "child.sd");
builder.build();
- Schema schema = builder.getSearch("child");
+ Schema schema = builder.getSchema("child");
String toDirName = "temp/" + name;
File toDir = new File(toDirName);
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 314882cac70..4994cffb92a 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
@@ -196,7 +196,7 @@ public class SummaryMapTestCase extends AbstractSchemaTestCase {
" }",
"}"));
builder.build();
- return builder.getSearch();
+ return builder.getSchema();
}
}
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 1dca28bb9b1..c996fb0c1b9 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
@@ -35,7 +35,7 @@ public class SummaryTestCase extends AbstractSchemaTestCase {
" }",
" }",
"}");
- Schema schema = SchemaBuilder.createFromString(sd).getSearch();
+ Schema schema = SchemaBuilder.createFromString(sd).getSchema();
SummaryClass summary = new SummaryClass(schema, schema.getSummary("default"), new BaseDeployLogger());
assertEquals(SummaryClassField.Type.RAW, summary.getField("raw_field").getType());
}
@@ -50,7 +50,7 @@ public class SummaryTestCase extends AbstractSchemaTestCase {
" }",
" }",
"}");
- Schema schema = SchemaBuilder.createFromString(sd).getSearch();
+ Schema schema = SchemaBuilder.createFromString(sd).getSchema();
SummaryClass summary = new SummaryClass(schema, schema.getSummary("default"), new BaseDeployLogger());
assertEquals(SummaryClassField.Type.DATA, summary.getField("raw_field").getType());
}
@@ -150,7 +150,7 @@ public class SummaryTestCase extends AbstractSchemaTestCase {
" }",
"}"));
builder.build();
- return builder.getSearch("ad");
+ return builder.getSchema("ad");
}
@Test
@@ -168,7 +168,7 @@ public class SummaryTestCase extends AbstractSchemaTestCase {
" summary foo type string {}",
" }",
"}");
- var search = SchemaBuilder.createFromString(sd).getSearch();
+ var search = SchemaBuilder.createFromString(sd).getSchema();
assertOmitSummaryFeatures(true, search, "bar");
assertOmitSummaryFeatures(false, search, "baz");
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/TwoStreamingStructsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/TwoStreamingStructsTestCase.java
index de8ced60917..c3a78bab441 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/derived/TwoStreamingStructsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/TwoStreamingStructsTestCase.java
@@ -21,12 +21,12 @@ public class TwoStreamingStructsTestCase extends AbstractExportingTestCase {
builder.importFile(root + "/streamingstruct.sd");
builder.importFile(root + "/whatever.sd");
builder.build();
- assertCorrectDeriving(builder, builder.getSearch("streamingstruct"), root);
+ assertCorrectDeriving(builder, builder.getSchema("streamingstruct"), root);
builder = new SchemaBuilder();
builder.importFile(root + "/streamingstruct.sd");
builder.importFile(root + "/whatever.sd");
builder.build();
- assertCorrectDeriving(builder, builder.getSearch("streamingstruct"), root);
+ assertCorrectDeriving(builder, builder.getSchema("streamingstruct"), root);
}
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/document/ComplexAttributeFieldUtilsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/document/ComplexAttributeFieldUtilsTestCase.java
index d3f991b2f00..481a4db11ec 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/document/ComplexAttributeFieldUtilsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/document/ComplexAttributeFieldUtilsTestCase.java
@@ -17,7 +17,7 @@ public class ComplexAttributeFieldUtilsTestCase {
private final ImmutableSDField field;
FixtureBase(String fieldName, String sdContent) throws ParseException {
- Schema schema = SchemaBuilder.createFromString(sdContent).getSearch();
+ Schema schema = SchemaBuilder.createFromString(sdContent).getSchema();
field = schema.getConcreteField(fieldName);
}
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 90f15b74881..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
@@ -31,7 +31,7 @@ public class DictionaryTestCase {
}
private Schema createSearch(String def) throws ParseException {
SchemaBuilder sb = SchemaBuilder.createFromString(def);
- return sb.getSearch();
+ return sb.getSchema();
}
@Test
public void testDefaultDictionarySettings() throws ParseException {
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 d57b29418c7..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
@@ -85,8 +85,8 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase {
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/ImportedFieldsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImportedFieldsTestCase.java
index b4f2340c3eb..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
@@ -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 {
@@ -315,7 +315,7 @@ public class ImportedFieldsTestCase {
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 {
@@ -324,7 +324,7 @@ public class ImportedFieldsTestCase {
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);
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 9f5487902a7..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
@@ -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/PositionTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/PositionTestCase.java
index d5abe7d04db..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
@@ -31,7 +31,7 @@ public class PositionTestCase {
"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")));
}
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 046114bbb43..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
@@ -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/RankingExpressionTypeResolverTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankingExpressionTypeResolverTestCase.java
index 288078fb2ca..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
@@ -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])"),
@@ -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])"),
@@ -281,7 +281,7 @@ public class RankingExpressionTypeResolverTestCase {
" }",
"}"));
builder.build();
- RankProfile profile = builder.getRankProfileRegistry().get(builder.getSearch(), "eurank");
+ RankProfile profile = builder.getRankProfileRegistry().get(builder.getSchema(), "eurank");
}
@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])"),
@@ -346,7 +346,7 @@ 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())));
}
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 d02a5422185..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
@@ -90,7 +90,7 @@ public class RankingExpressionWithTransformerTokensTestCase {
SchemaBuilder schemaBuilder = new SchemaBuilder(application, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
schemaBuilder.importString(sdContent);
schemaBuilder.build();
- Schema schema = schemaBuilder.getSearch();
+ 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 7e453aa74dd..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
@@ -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 SchemaBuilder.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 3dcabca4f0f..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
@@ -50,7 +50,7 @@ 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());
}
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 abb3558c052..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
@@ -39,7 +39,7 @@ public class SummaryConsistencyTestCase {
"",
"}"
);
- Schema schema = SchemaBuilder.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/TensorFieldTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorFieldTestCase.java
index 867cb26cbe6..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
@@ -137,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 b4c2260ea4f..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
@@ -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/vespa/model/search/test/SchemaClusterTest.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/SchemaClusterTest.java
index 66cbdabf0cb..6830ce79f9f 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/SchemaClusterTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/SchemaClusterTest.java
@@ -57,8 +57,8 @@ public class SchemaClusterTest {
schema2.addDocument(sdt2);
SchemaBuilder builder = new SchemaBuilder();
- builder.importRawSearch(schema1);
- builder.importRawSearch(schema2);
+ builder.importRawSchema(schema1);
+ builder.importRawSchema(schema2);
builder.build();
}
diff --git a/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java b/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
index 79803fd2759..79325075a42 100644
--- a/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
+++ b/vespa-documentgen-plugin/src/main/java/com/yahoo/vespa/DocumentGenMojo.java
@@ -149,7 +149,7 @@ public class DocumentGenMojo extends AbstractMojo {
}
}
builder.build();
- for (Schema schema : builder.getSearchList() ) {
+ for (Schema schema : builder.getSchemaList() ) {
this.searches.put(schema.getName(), schema);
}
return builder;