diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-01-24 16:50:33 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-01-24 16:50:33 +0100 |
commit | 0b6bca0b96381d94c4520916b77238f17aa4d2ee (patch) | |
tree | 6f7236be0dfc405739fca88821f3b94f781ef78e | |
parent | b9dee04bc057d665b86f7d539647e3681daf4102 (diff) |
Simplify
15 files changed, 55 insertions, 94 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java index 74a0a7cba57..92c0621570b 100644 --- a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java +++ b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java @@ -30,6 +30,7 @@ import com.yahoo.config.provision.Zone; import com.yahoo.io.IOUtils; import com.yahoo.io.reader.NamedReader; import com.yahoo.searchdefinition.RankProfileRegistry; +import com.yahoo.searchdefinition.Schema; import com.yahoo.searchdefinition.SchemaBuilder; import com.yahoo.searchdefinition.parser.ParseException; import com.yahoo.vespa.config.ConfigDefinition; @@ -40,7 +41,6 @@ import com.yahoo.vespa.model.container.search.QueryProfiles; import com.yahoo.vespa.model.container.search.QueryProfilesBuilder; import com.yahoo.vespa.model.container.search.SemanticRuleBuilder; import com.yahoo.vespa.model.container.search.SemanticRules; -import com.yahoo.vespa.model.search.NamedSchema; import java.io.File; import java.io.FileNotFoundException; @@ -69,7 +69,7 @@ public class DeployState implements ConfigDefinitionStore { private final DeployLogger logger; private final FileRegistry fileRegistry; private final DocumentModel documentModel; - private final List<NamedSchema> schemas; + private final List<Schema> schemas; private final ApplicationPackage applicationPackage; private final Optional<ConfigDefinitionRepo> configDefinitionRepo; private final Optional<ApplicationPackage> permanentApplicationPackage; @@ -236,9 +236,7 @@ public class DeployState implements ConfigDefinitionStore { return applicationPackage; } - public List<NamedSchema> getSchemas() { - return schemas; - } + public List<Schema> getSchemas() { return schemas; } public DocumentModel getDocumentModel() { return documentModel; 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 92950e01766..2e4a41b70d5 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 @@ -4,11 +4,9 @@ package com.yahoo.config.model.deploy; import com.yahoo.searchdefinition.Schema; import com.yahoo.searchdefinition.SchemaBuilder; import com.yahoo.vespa.documentmodel.DocumentModel; -import com.yahoo.vespa.model.search.NamedSchema; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * Internal helper class to retrieve document model and schemas. @@ -19,9 +17,9 @@ import java.util.Map; public class SearchDocumentModel { private final DocumentModel documentModel; - private final List<NamedSchema> schemas; + private final List<Schema> schemas; - public SearchDocumentModel(DocumentModel documentModel, List<NamedSchema> schemas) { + public SearchDocumentModel(DocumentModel documentModel, List<Schema> schemas) { this.documentModel = documentModel; this.schemas = schemas; } @@ -30,14 +28,14 @@ public class SearchDocumentModel { return documentModel; } - public List<NamedSchema> getSchemas() { + public List<Schema> getSchemas() { return schemas; } public static SearchDocumentModel fromBuilder(SchemaBuilder builder) { - List<NamedSchema> ret = new ArrayList<>(); + List<Schema> ret = new ArrayList<>(); for (Schema schema : builder.getSchemaList()) { - ret.add(new NamedSchema(schema.getName(), schema)); + ret.add(schema); } return new SearchDocumentModel(builder.getModel(), ret); } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/ComplexAttributeFieldsValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/ComplexAttributeFieldsValidator.java index e2b08a621d1..b977e4c657e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/ComplexAttributeFieldsValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/ComplexAttributeFieldsValidator.java @@ -34,7 +34,7 @@ public class ComplexAttributeFieldsValidator extends Validator { } SearchCluster searchCluster = (SearchCluster) cluster; for (AbstractSearchCluster.SchemaSpec spec : searchCluster.getLocalSDS()) { - validateComplexFields(searchCluster.getClusterName(), spec.getSearchDefinition().getSearch()); + validateComplexFields(searchCluster.getClusterName(), spec.getSchema()); } } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankingConstantsValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankingConstantsValidator.java index f741c59e414..82c793af70a 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankingConstantsValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankingConstantsValidator.java @@ -7,9 +7,9 @@ import com.yahoo.config.model.application.provider.FilesApplicationPackage; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.path.Path; import com.yahoo.searchdefinition.RankingConstant; +import com.yahoo.searchdefinition.Schema; import com.yahoo.vespa.model.VespaModel; import com.yahoo.vespa.model.application.validation.ConstantTensorJsonValidator.InvalidConstantTensorException; -import com.yahoo.vespa.model.search.NamedSchema; import java.io.FileNotFoundException; @@ -47,8 +47,8 @@ public class RankingConstantsValidator extends Validator { ApplicationPackage applicationPackage = deployState.getApplicationPackage(); ExceptionMessageCollector exceptionMessageCollector = new ExceptionMessageCollector("Invalid constant tensor file(s):"); - for (NamedSchema sd : deployState.getSchemas()) { - for (RankingConstant rc : sd.getSearch().rankingConstants().asMap().values()) { + for (Schema schema : deployState.getSchemas()) { + for (RankingConstant rc : schema.rankingConstants().asMap().values()) { try { validateRankingConstant(rc, applicationPackage); } catch (InvalidConstantTensorException | FileNotFoundException ex) { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/SearchDataTypeValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/SearchDataTypeValidator.java index 14f5c345025..976ed0a0219 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/SearchDataTypeValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/SearchDataTypeValidator.java @@ -11,11 +11,11 @@ import com.yahoo.document.ReferenceDataType; import com.yahoo.document.StructDataType; import com.yahoo.document.TensorDataType; import com.yahoo.document.WeightedSetDataType; +import com.yahoo.searchdefinition.Schema; import com.yahoo.searchdefinition.document.SDDocumentType; import com.yahoo.searchdefinition.document.SDField; import com.yahoo.vespa.model.VespaModel; import com.yahoo.vespa.model.search.AbstractSearchCluster; -import com.yahoo.vespa.model.search.NamedSchema; import java.util.List; @@ -35,26 +35,26 @@ public class SearchDataTypeValidator extends Validator { continue; } for (AbstractSearchCluster.SchemaSpec spec : cluster.getLocalSDS()) { - SDDocumentType docType = spec.getSearchDefinition().getSearch().getDocument(); + SDDocumentType docType = spec.getSchema().getDocument(); if (docType == null) { continue; } - validateDocument(cluster, spec.getSearchDefinition(), docType); + validateDocument(cluster, spec.getSchema(), docType); } } } - private void validateDocument(AbstractSearchCluster cluster, NamedSchema def, SDDocumentType doc) { + private void validateDocument(AbstractSearchCluster cluster, Schema schema, SDDocumentType doc) { for (SDDocumentType child : doc.getTypes()) { - validateDocument(cluster, def, child); + validateDocument(cluster, schema, child); } for (Field field : doc.fieldSet()) { DataType fieldType = field.getDataType(); - disallowIndexingOfMaps(cluster, def, field); + disallowIndexingOfMaps(cluster, schema, field); if ( ! isSupportedInSearchClusters(fieldType)) { throw new IllegalArgumentException("Field type '" + fieldType.getName() + "' is illegal for search " + - "clusters (field '" + field.getName() + "' in definition '" + - def.getName() + "' for cluster '" + cluster.getClusterName() + "')."); + "clusters (field '" + field.getName() + "' in schema '" + + schema.getName() + "' for cluster '" + cluster.getClusterName() + "')."); } } } @@ -84,12 +84,12 @@ public class SearchDataTypeValidator extends Validator { } } - private void disallowIndexingOfMaps(AbstractSearchCluster cluster, NamedSchema def, Field field) { + private void disallowIndexingOfMaps(AbstractSearchCluster cluster, Schema schema, Field field) { DataType fieldType = field.getDataType(); if ((fieldType instanceof MapDataType) && (((SDField) field).doesIndexing())) { throw new IllegalArgumentException("Field type '" + fieldType.getName() + "' cannot be indexed for search " + "clusters (field '" + field.getName() + "' in definition '" + - def.getName() + "' for cluster '" + cluster.getClusterName() + "')."); + schema.getName() + "' for cluster '" + cluster.getClusterName() + "')."); } } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java index 0e53417aea9..e0b7c3b288a 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/ContainerSearch.java @@ -125,7 +125,7 @@ public class ContainerSearch extends ContainerSubsystem<SearchChains> QrSearchersConfig.Searchcluster.Builder scB = new QrSearchersConfig.Searchcluster.Builder(). name(sys.getClusterName()); for (AbstractSearchCluster.SchemaSpec spec : sys.getLocalSDS()) { - scB.searchdef(spec.getSearchDefinition().getName()); + scB.searchdef(spec.getSchema().getName()); } scB.rankprofiles(new QrSearchersConfig.Searchcluster.Rankprofiles.Builder().configid(sys.getConfigId())); scB.indexingmode(QrSearchersConfig.Searchcluster.Indexingmode.Enum.valueOf(sys.getIndexingModeName())); diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/LocalProvider.java b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/LocalProvider.java index e2579d95fc0..7eefa2e5e74 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/LocalProvider.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/search/searchchain/LocalProvider.java @@ -116,7 +116,7 @@ public class LocalProvider extends Provider implements List<String> documentTypes = new ArrayList<>(); for (AbstractSearchCluster.SchemaSpec spec : searchCluster.getLocalSDS()) { - documentTypes.add(spec.getSearchDefinition().getSearch().getDocument().getName()); + documentTypes.add(spec.getSchema().getDocument().getName()); } return documentTypes; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java index a37918f516e..32c5522f448 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java @@ -5,6 +5,7 @@ import com.yahoo.config.model.api.ModelContext; import com.yahoo.config.model.deploy.DeployState; import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.documentmodel.NewDocumentType; +import com.yahoo.searchdefinition.Schema; import com.yahoo.vespa.config.search.DispatchConfig; import com.yahoo.vespa.config.search.core.ProtonConfig; import com.yahoo.vespa.model.builder.UserConfigBuilder; @@ -14,7 +15,6 @@ import com.yahoo.vespa.model.builder.xml.dom.VespaDomBuilder; import com.yahoo.vespa.model.content.cluster.ContentCluster; import com.yahoo.vespa.model.search.AbstractSearchCluster; import com.yahoo.vespa.model.search.IndexedSearchCluster; -import com.yahoo.vespa.model.search.NamedSchema; import com.yahoo.vespa.model.search.NodeSpec; import com.yahoo.vespa.model.search.SchemaDefinitionXMLHandler; import com.yahoo.vespa.model.search.SearchCluster; @@ -249,17 +249,15 @@ public class ContentSearchCluster extends AbstractConfigProducer<SearchCluster> private void addSchemas(DeployState deployState, List<ModelElement> searchDefs, AbstractSearchCluster sc) { for (ModelElement e : searchDefs) { SchemaDefinitionXMLHandler schemaDefinitionXMLHandler = new SchemaDefinitionXMLHandler(e); - NamedSchema searchDefinition = - schemaDefinitionXMLHandler.findResponsibleSchema(deployState.getSchemas()); - if (searchDefinition == null) + Schema schema = schemaDefinitionXMLHandler.findResponsibleSchema(deployState.getSchemas()); + if (schema == null) throw new IllegalArgumentException("Schema '" + schemaDefinitionXMLHandler.getName() + "' referenced in " + this + " does not exist"); // TODO: remove explicit building of user configs when the complete content model is built using builders. - sc.getLocalSDS().add(new AbstractSearchCluster.SchemaSpec(searchDefinition, + sc.getLocalSDS().add(new AbstractSearchCluster.SchemaSpec(schema, UserConfigBuilder.build(e.getXml(), deployState, deployState.getDeployLogger()))); - //need to get the document names from this sdfile - sc.addDocumentNames(searchDefinition); + sc.addDocumentNames(schema); } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/AbstractSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/AbstractSearchCluster.java index 19b1f39c87d..93a264ae4bb 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/AbstractSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/AbstractSearchCluster.java @@ -5,6 +5,7 @@ import com.yahoo.config.model.producer.AbstractConfigProducer; import com.yahoo.config.model.producer.UserConfigRepo; import com.yahoo.prelude.fastsearch.DocumentdbInfoConfig; import com.yahoo.search.config.IndexInfoConfig; +import com.yahoo.searchdefinition.Schema; import com.yahoo.vespa.config.search.AttributesConfig; import com.yahoo.vespa.config.search.RankProfilesConfig; import com.yahoo.vespa.configdefinition.IlscriptsConfig; @@ -37,9 +38,8 @@ public abstract class AbstractSearchCluster extends AbstractConfigProducer<Abstr this.index = index; } - public void addDocumentNames(NamedSchema searchDefinition) { - String dName = searchDefinition.getSearch().getDocument().getDocumentName().getName(); - documentNames.add(dName); + public void addDocumentNames(Schema schema) { + documentNames.add(schema.getDocument().getDocumentName().getName()); } /** Returns a List with document names used in this search cluster */ @@ -51,16 +51,15 @@ public abstract class AbstractSearchCluster extends AbstractConfigProducer<Abstr public String getClusterName() { return clusterName; } public final String getIndexingModeName() { return getIndexingMode().getName(); } - public final boolean isRealtime() { return getIndexingMode() == IndexingMode.REALTIME; } public final boolean isStreaming() { return getIndexingMode() == IndexingMode.STREAMING; } public final AbstractSearchCluster setQueryTimeout(Double to) { - this.queryTimeout=to; + this.queryTimeout = to; return this; } public final AbstractSearchCluster setVisibilityDelay(double delay) { - this.visibilityDelay=delay; + this.visibilityDelay = delay; return this; } @@ -103,16 +102,16 @@ public abstract class AbstractSearchCluster extends AbstractConfigProducer<Abstr public static final class SchemaSpec { - private final NamedSchema searchDefinition; + private final Schema schema; private final UserConfigRepo userConfigRepo; - public SchemaSpec(NamedSchema searchDefinition, UserConfigRepo userConfigRepo) { - this.searchDefinition = searchDefinition; + public SchemaSpec(Schema schema, UserConfigRepo userConfigRepo) { + this.schema = schema; this.userConfigRepo = userConfigRepo; } - public NamedSchema getSearchDefinition() { - return searchDefinition; + public Schema getSchema() { + return schema; } public UserConfigRepo getUserConfigs() { diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java index a68993be543..fb7c6696b54 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/IndexedSearchCluster.java @@ -196,10 +196,9 @@ public class IndexedSearchCluster extends SearchCluster @Override protected void deriveAllSchemas(List<SchemaSpec> localSearches, DeployState deployState) { for (SchemaSpec spec : localSearches) { - Schema schema = spec.getSearchDefinition().getSearch(); - if ( ! (schema instanceof DocumentOnlySchema)) { - DocumentDatabase db = new DocumentDatabase(this, schema.getName(), - new DerivedConfiguration(schema, + if ( ! (spec.getSchema() instanceof DocumentOnlySchema)) { + DocumentDatabase db = new DocumentDatabase(this, spec.getSchema().getName(), + new DerivedConfiguration(spec.getSchema(), deployState.getDeployLogger(), deployState.getProperties(), deployState.rankProfileRegistry(), diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/NamedSchema.java b/config-model/src/main/java/com/yahoo/vespa/model/search/NamedSchema.java deleted file mode 100644 index dac823a3b92..00000000000 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/NamedSchema.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.model.search; - -import com.yahoo.searchdefinition.Schema; - -import java.util.Collection; - -/** - * @author Tony Vaagenes - */ -// TODO: This class is quite pointless -public class NamedSchema { - - private final Schema schema; - private final String name; - - public Schema getSearch() { - return schema; - } - - public String getName() { - return name; - } - - public NamedSchema(String name, Schema schema) { - this.name = name; - this.schema = schema; - } - -} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SchemaDefinitionXMLHandler.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SchemaDefinitionXMLHandler.java index 8f5d92ce4bd..b4082308195 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/SchemaDefinitionXMLHandler.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SchemaDefinitionXMLHandler.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.search; +import com.yahoo.searchdefinition.Schema; import com.yahoo.vespa.model.builder.xml.dom.ModelElement; import java.io.Serializable; @@ -25,8 +26,8 @@ public class SchemaDefinitionXMLHandler implements Serializable { public String getName() { return schemaName; } - public NamedSchema findResponsibleSchema(List<NamedSchema> schemas) { - for (NamedSchema candidate : schemas) { + public Schema findResponsibleSchema(List<Schema> schemas) { + for (Schema candidate : schemas) { if (candidate.getName().equals(schemaName) ) return candidate; } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java index bacba9ea61d..42bb2a1da29 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/search/StreamingSearchCluster.java @@ -85,7 +85,7 @@ public class StreamingSearchCluster extends SearchCluster implements @Override protected void deriveAllSchemas(List<SchemaSpec> local, DeployState deployState) { if (local.size() == 1) { - deriveSingleSearchDefinition(local.get(0).getSearchDefinition().getSearch(), deployState); + deriveSingleSearchDefinition(local.get(0).getSchema(), deployState); } else if (local.size() > 1){ throw new IllegalArgumentException("Only a single schema is supported, got " + local.size()); } diff --git a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java index 25f7f454998..3acc44113d0 100644 --- a/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java +++ b/config-model/src/test/java/com/yahoo/config/model/ApplicationDeployTest.java @@ -18,7 +18,6 @@ import com.yahoo.searchdefinition.Schema; import com.yahoo.vespa.config.ConfigDefinition; import com.yahoo.vespa.config.ConfigDefinitionKey; import com.yahoo.vespa.model.VespaModel; -import com.yahoo.vespa.model.search.NamedSchema; import org.junit.After; import org.junit.Rule; import org.junit.Test; @@ -55,19 +54,18 @@ public class ApplicationDeployTest { public void testVespaModel() throws SAXException, IOException { ApplicationPackageTester tester = ApplicationPackageTester.create(TESTDIR + "app1"); new VespaModel(tester.app()); - List<NamedSchema> schemas = tester.getSchemas(); + List<Schema> schemas = tester.getSchemas(); assertEquals(schemas.size(), 5); - for (NamedSchema searchDefinition : schemas) { - Schema s = searchDefinition.getSearch(); - switch (s.getName()) { + for (Schema schema : schemas) { + switch (schema.getName()) { case "music": case "laptop": case "pc": case "sock": break; case "product": - assertTrue(s instanceof DocumentOnlySchema); - assertEquals(DataType.STRING, s.getDocument().getField("title").getDataType()); + assertTrue(schema instanceof DocumentOnlySchema); + assertEquals(DataType.STRING, schema.getDocument().getField("title").getDataType()); break; default: fail(); @@ -95,8 +93,8 @@ public class ApplicationDeployTest { // Check that getFilename works ArrayList<String> sdFileNames = new ArrayList<>(); - for (NamedSchema sd : schemas) - sdFileNames.add(sd.getName() + ApplicationPackage.SD_NAME_SUFFIX); + for (Schema schema : schemas) + sdFileNames.add(schema.getName() + ApplicationPackage.SD_NAME_SUFFIX); Collections.sort(sdFileNames); assertEquals("laptop.sd", sdFileNames.get(0)); assertEquals("music.sd", sdFileNames.get(1)); diff --git a/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java b/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java index 3d799375420..96186150108 100644 --- a/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java +++ b/config-model/src/test/java/com/yahoo/config/model/ApplicationPackageTester.java @@ -5,7 +5,7 @@ import com.yahoo.component.Version; import com.yahoo.config.model.application.provider.ApplicationPackageXmlFilesValidator; import com.yahoo.config.model.application.provider.FilesApplicationPackage; import com.yahoo.config.model.deploy.DeployState; -import com.yahoo.vespa.model.search.NamedSchema; +import com.yahoo.searchdefinition.Schema; import java.io.File; import java.io.IOException; @@ -39,7 +39,7 @@ public class ApplicationPackageTester { public FilesApplicationPackage app() { return applicationPackage; } - public List<NamedSchema> getSchemas() { + public List<Schema> getSchemas() { return new DeployState.Builder().applicationPackage(app()).build().getSchemas(); } |