diff options
author | Geir Storli <geirst@yahoo-inc.com> | 2017-08-14 15:47:05 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahoo-inc.com> | 2017-08-16 10:55:11 +0200 |
commit | 5d7ff977824a80cd1cecff859e429e922e597c79 (patch) | |
tree | c5031d14701f995d6b148af33c9a2b152ff3dcf4 /searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp | |
parent | 64383fa4fdff3d52cb9c7a1838f7b9cdb14be960 (diff) |
Change SchemaBuilder to use attributes config to setup imported attribute fields in schema.
Diffstat (limited to 'searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp')
-rw-r--r-- | searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp b/searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp index e6200338047..0347da0c52c 100644 --- a/searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp +++ b/searchcore/src/apps/verify_ranksetup/verify_ranksetup.cpp @@ -30,7 +30,6 @@ using config::IConfigContext; using config::InvalidConfigException; using proton::matching::IConstantValueRepo; using vespa::config::search::AttributesConfig; -using vespa::config::search::ImportedFieldsConfig; using vespa::config::search::IndexschemaConfig; using vespa::config::search::RankProfilesConfig; using vespa::config::search::core::RankingConstantsConfig; @@ -54,8 +53,7 @@ public: bool verifyConfig(const RankProfilesConfig &rankCfg, const IndexschemaConfig &schemaCfg, const AttributesConfig &attributeCfg, - const RankingConstantsConfig &constantsCfg, - const ImportedFieldsConfig &importedFieldsCfg); + const RankingConstantsConfig &constantsCfg); int usage(); int Main() override; @@ -108,14 +106,12 @@ bool App::verifyConfig(const RankProfilesConfig &rankCfg, const IndexschemaConfig &schemaCfg, const AttributesConfig &attributeCfg, - const RankingConstantsConfig &constantsCfg, - const ImportedFieldsConfig &importedFieldsCfg) + const RankingConstantsConfig &constantsCfg) { bool ok = true; search::index::Schema schema; search::index::SchemaBuilder::build(schemaCfg, schema); search::index::SchemaBuilder::build(attributeCfg, schema); - search::index::SchemaBuilder::build(importedFieldsCfg, schema); DummyConstantValueRepo repo(constantsCfg); for(size_t i = 0; i < rankCfg.rankprofile.size(); i++) { search::fef::Properties properties; @@ -161,14 +157,12 @@ App::Main() ConfigHandle<AttributesConfig>::UP attributesHandle = subscriber.subscribe<AttributesConfig>(cfgId); ConfigHandle<IndexschemaConfig>::UP schemaHandle = subscriber.subscribe<IndexschemaConfig>(cfgId); ConfigHandle<RankingConstantsConfig>::UP constantsHandle = subscriber.subscribe<RankingConstantsConfig>(cfgId); - ConfigHandle<ImportedFieldsConfig>::UP importedFieldsHandle = subscriber.subscribe<ImportedFieldsConfig>(cfgId); subscriber.nextConfig(); ok = verifyConfig(*rankHandle->getConfig(), *schemaHandle->getConfig(), *attributesHandle->getConfig(), - *constantsHandle->getConfig(), - *importedFieldsHandle->getConfig()); + *constantsHandle->getConfig()); } catch (ConfigRuntimeException & e) { LOG(error, "Unable to subscribe to config: %s", e.getMessage().c_str()); } catch (InvalidConfigException & e) { |