diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-09-22 13:16:16 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-09-22 13:16:16 +0200 |
commit | 618e9cd7f9edebc86049ad61d0cc3c0493738260 (patch) | |
tree | f488dcc140806fbfaddf67c43b754568b4c54690 /searchcore | |
parent | 505b96257fda9084527d8bb9adbf2f2e7f20855c (diff) |
Remove summary fields from schema.
Diffstat (limited to 'searchcore')
8 files changed, 7 insertions, 14 deletions
diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp index a40ebdfa6ff..0db14538630 100644 --- a/searchcore/src/apps/tests/persistenceconformance_test.cpp +++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp @@ -124,7 +124,7 @@ public: CS::IndexschemaConfigSP indexschema = _schemaFactory->createIndexSchema(*docType); CS::AttributesConfigSP attributes = _schemaFactory->createAttributes(*docType); CS::SummaryConfigSP summary = _schemaFactory->createSummary(*docType); - auto schema = DocumentDBConfig::build_schema(*attributes, *summary, *indexschema); + auto schema = DocumentDBConfig::build_schema(*attributes, *indexschema); return std::make_shared<DocumentDBConfig>( 1, std::make_shared<RankProfilesConfig>(), diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp index f1d6a384e9c..619160ad0d9 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfig/documentdbconfig_test.cpp @@ -141,7 +141,6 @@ struct Fixture { { basic_schema->addAttributeField(Schema::AttributeField("my_attribute", schema::DataType::INT32)); full_schema->addAttributeField(Schema::AttributeField("my_attribute", schema::DataType::INT32)); - full_schema->addSummaryField(Schema::SummaryField("my_attribute", schema::DataType::INT32)); basicCfg = MyConfigBuilder(4, basic_schema, repo).addAttribute().addSummary(false, false).build(); fullCfg = MyConfigBuilder(4, full_schema, repo).addAttribute(). addRankProfile(). diff --git a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp index b9278c41d1d..e929b699355 100644 --- a/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp +++ b/searchcore/src/tests/proton/proton_configurer/proton_configurer_test.cpp @@ -56,7 +56,7 @@ struct DBConfigFixture { Schema::SP buildSchema() { - return DocumentDBConfig::build_schema(_attributesBuilder, _summaryBuilder, _indexschemaBuilder); + return DocumentDBConfig::build_schema(_attributesBuilder, _indexschemaBuilder); } static RankingConstants::SP buildRankingConstants() diff --git a/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp b/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp index cfcb7af2472..1e00c958723 100644 --- a/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp +++ b/searchcore/src/vespa/searchcore/bmcluster/bm_node.cpp @@ -176,7 +176,7 @@ std::shared_ptr<DocumentDBConfig> make_document_db_config(std::shared_ptr<Docume auto indexschema = std::make_shared<IndexschemaConfig>(); auto attributes = make_attributes_config(); auto summary = std::make_shared<SummaryConfig>(); - auto schema = DocumentDBConfig::build_schema(*attributes, *summary, *indexschema); + auto schema = DocumentDBConfig::build_schema(*attributes, *indexschema); return std::make_shared<DocumentDBConfig>( 1, std::make_shared<RankProfilesConfig>(), diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp index 5992762b323..dc5e1c3f8f8 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp @@ -237,7 +237,7 @@ DocumentDBConfig::makeReplayConfig(const SP & orig) const DocumentDBConfig &o = *orig; auto replay_summary_config = emptyConfig(o._summary); - auto replay_schema = build_schema(*o._attributes, *replay_summary_config, *o._indexschema); + auto replay_schema = build_schema(*o._attributes, *o._indexschema); if (*replay_schema == *o._schema) { replay_schema = o._schema; } @@ -356,12 +356,10 @@ DocumentDBConfig::getDocumentType() const std::shared_ptr<Schema> DocumentDBConfig::build_schema(const AttributesConfig& attributes_config, - const SummaryConfig& summary_config, const IndexschemaConfig &indexschema_config) { auto schema = std::make_shared<Schema>(); SchemaBuilder::build(attributes_config, *schema); - SchemaBuilder::build(summary_config, *schema); SchemaBuilder::build(indexschema_config, *schema); return schema; } diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h index 1d0980238a3..ed1e8fc7516 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h @@ -253,7 +253,6 @@ public: static std::shared_ptr<search::index::Schema> build_schema(const AttributesConfig& attributes_config, - const SummaryConfig& summary_config, const IndexschemaConfig &indexschema_config); }; diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp index e24ca7a8793..e2ab04e4f2e 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp @@ -74,7 +74,6 @@ DocumentDBConfigManager::createConfigKeySet() const Schema::SP DocumentDBConfigManager::buildSchema(const AttributesConfig &newAttributesConfig, - const SummaryConfig &newSummaryConfig, const IndexschemaConfig &newIndexschemaConfig) { // Called with lock held @@ -83,14 +82,13 @@ DocumentDBConfigManager::buildSchema(const AttributesConfig &newAttributesConfig oldSchema = _pendingConfigSnapshot->getSchemaSP(); } if (!oldSchema) { - return DocumentDBConfig::build_schema(newAttributesConfig, newSummaryConfig, newIndexschemaConfig); + return DocumentDBConfig::build_schema(newAttributesConfig, newIndexschemaConfig); } const DocumentDBConfig &old = *_pendingConfigSnapshot; if (old.getAttributesConfig() != newAttributesConfig || - old.getSummaryConfig() != newSummaryConfig || old.getIndexschemaConfig() != newIndexschemaConfig) { - auto schema = DocumentDBConfig::build_schema(newAttributesConfig, newSummaryConfig, newIndexschemaConfig); + auto schema = DocumentDBConfig::build_schema(newAttributesConfig, newIndexschemaConfig); return (*oldSchema == *schema) ? oldSchema : schema; } return oldSchema; @@ -376,7 +374,7 @@ DocumentDBConfigManager::update(FNET_Transport & transport, const ConfigSnapshot JuniperrcConfigSP newJuniperrcConfig = snapshot.getConfig<JuniperrcConfig>(_configId); ImportedFieldsConfigSP newImportedFieldsConfig = snapshot.getConfig<ImportedFieldsConfig>(_configId); - Schema::SP schema(buildSchema(*newAttributesConfig, *newSummaryConfig, *newIndexschemaConfig)); + Schema::SP schema(buildSchema(*newAttributesConfig, *newIndexschemaConfig)); newMaintenanceConfig = buildMaintenanceConfig(_bootstrapConfig, _docTypeName); search::LogDocumentStore::Config storeConfig = buildStoreConfig(_bootstrapConfig->getProtonConfig(), _bootstrapConfig->getHwInfo()); diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h index 74f58bca9a9..cadf287f9df 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h @@ -34,7 +34,6 @@ private: search::index::Schema::SP buildSchema(const DocumentDBConfig::AttributesConfig & newAttributesConfig, - const DocumentDBConfig::SummaryConfig & newSummaryConfig, const DocumentDBConfig::IndexschemaConfig & newIndexschemaConfig); public: |