Search in sources :

Example 1 with RankingConstantsConfig

use of com.yahoo.vespa.config.search.core.RankingConstantsConfig 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);
}
Also used : AbstractConfigProducer(com.yahoo.config.model.producer.AbstractConfigProducer) ImportedFieldsConfig(com.yahoo.vespa.config.search.ImportedFieldsConfig) RankProfilesConfig(com.yahoo.vespa.config.search.RankProfilesConfig) IndexschemaConfig(com.yahoo.vespa.config.search.IndexschemaConfig) AttributesConfig(com.yahoo.vespa.config.search.AttributesConfig) RankingConstantsConfig(com.yahoo.vespa.config.search.core.RankingConstantsConfig)

Aggregations

AbstractConfigProducer (com.yahoo.config.model.producer.AbstractConfigProducer)1 AttributesConfig (com.yahoo.vespa.config.search.AttributesConfig)1 ImportedFieldsConfig (com.yahoo.vespa.config.search.ImportedFieldsConfig)1 IndexschemaConfig (com.yahoo.vespa.config.search.IndexschemaConfig)1 RankProfilesConfig (com.yahoo.vespa.config.search.RankProfilesConfig)1 RankingConstantsConfig (com.yahoo.vespa.config.search.core.RankingConstantsConfig)1