use of com.yahoo.vespa.config.search.IndexschemaConfig in project vespa by vespa-engine.
the class DocumentDatabaseTestCase method assertDocTypeConfig.
private void assertDocTypeConfig(VespaModel model, String configId, String indexField, String attributeField) {
IndexschemaConfig icfg = model.getConfig(IndexschemaConfig.class, configId);
assertEquals(1, icfg.indexfield().size());
assertEquals(indexField, icfg.indexfield(0).name());
AttributesConfig acfg = model.getConfig(AttributesConfig.class, configId);
assertEquals(2, acfg.attribute().size());
assertEquals(attributeField, acfg.attribute(0).name());
assertEquals(attributeField + "_nfa", acfg.attribute(1).name());
RankProfilesConfig rcfg = model.getConfig(RankProfilesConfig.class, configId);
assertEquals(6, rcfg.rankprofile().size());
}
use of com.yahoo.vespa.config.search.IndexschemaConfig in project vespa by vespa-engine.
the class RankSetupValidator method writeConfigs.
private void writeConfigs(String dir, AbstractConfigProducer producer) throws IOException {
RankProfilesConfig.Builder rpcb = new RankProfilesConfig.Builder();
RankProfilesConfig.Producer.class.cast(producer).getConfig(rpcb);
RankProfilesConfig rpc = new RankProfilesConfig(rpcb);
writeConfig(dir, RankProfilesConfig.getDefName() + ".cfg", rpc);
IndexschemaConfig.Builder iscb = new IndexschemaConfig.Builder();
IndexschemaConfig.Producer.class.cast(producer).getConfig(iscb);
IndexschemaConfig isc = new IndexschemaConfig(iscb);
writeConfig(dir, IndexschemaConfig.getDefName() + ".cfg", isc);
AttributesConfig.Builder acb = new AttributesConfig.Builder();
AttributesConfig.Producer.class.cast(producer).getConfig(acb);
AttributesConfig ac = new AttributesConfig(acb);
writeConfig(dir, AttributesConfig.getDefName() + ".cfg", ac);
RankingConstantsConfig.Builder rccb = new RankingConstantsConfig.Builder();
RankingConstantsConfig.Producer.class.cast(producer).getConfig(rccb);
RankingConstantsConfig rcc = new RankingConstantsConfig(rccb);
writeConfig(dir, RankingConstantsConfig.getDefName() + ".cfg", rcc);
ImportedFieldsConfig.Builder ifcb = new ImportedFieldsConfig.Builder();
ImportedFieldsConfig.Producer.class.cast(producer).getConfig(ifcb);
ImportedFieldsConfig ifc = new ImportedFieldsConfig(ifcb);
writeConfig(dir, ImportedFieldsConfig.getDefName() + ".cfg", ifc);
}
Aggregations