diff options
author | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:55:29 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahooinc.com> | 2023-03-13 13:59:08 +0000 |
commit | 0c657642eff7d85c000464e9edba16ded4845e7d (patch) | |
tree | 3315f420e49dd85739089780388007ce1649672a /searchsummary/src | |
parent | a40183094fd45dbf320dd57f8d56a5a6fac7f247 (diff) |
Reduce creation of Document instances without DocumentTypeRepo.
Diffstat (limited to 'searchsummary/src')
3 files changed, 3 insertions, 4 deletions
diff --git a/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp b/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp index 7e54f35ff38..8dfdd1877f1 100644 --- a/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp +++ b/searchsummary/src/tests/docsummary/document_id_dfw/document_id_dfw_test.cpp @@ -95,8 +95,7 @@ DocumentIdDFWTest::~DocumentIdDFWTest() = default; std::unique_ptr<IDocsumStoreDocument> DocumentIdDFWTest::make_docsum_store_document(const vespalib::string& id) { - auto doc = std::make_unique<Document>(*_document_type, DocumentId(id)); - doc->setRepo(*_repo); + auto doc = std::make_unique<Document>(*_repo, *_document_type, DocumentId(id)); return std::make_unique<DocsumStoreDocument>(std::move(doc)); } diff --git a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp index 7eb634f5609..7b83dbe2c4e 100644 --- a/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp +++ b/searchsummary/src/tests/docsummary/matched_elements_filter/matched_elements_filter_test.cpp @@ -102,7 +102,7 @@ public: } ~DocsumStore(); std::unique_ptr<IDocsumStoreDocument> getMappedDocsum() { - auto doc = std::make_unique<Document>(_doc_type, DocumentId("id:test:test::0")); + auto doc = Document::make_without_repo(_doc_type, DocumentId("id:test:test::0")); { ArrayFieldValue array_value(_array_type); if (!_empty_values) { diff --git a/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp b/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp index 93f87d9c5be..7077f707247 100644 --- a/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp +++ b/searchsummary/src/tests/docsummary/slime_summary/slime_summary_test.cpp @@ -68,7 +68,7 @@ struct SlimeSummaryTest : testing::Test, IDocsumStore, GetDocsumsStateCallback { if (empty_get_mapped_docsum) { return std::make_unique<DocsumStoreDocument>(std::unique_ptr<Document>()); } - auto doc = std::make_unique<Document>(doc_type, DocumentId("id:test:test::0")); + auto doc = Document::make_without_repo(doc_type, DocumentId("id:test:test::0")); doc->setValue("int_field", IntFieldValue(4)); doc->setValue("short_field", ShortFieldValue(2)); doc->setValue("byte_field", ByteFieldValue(1)); |