diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-06 15:15:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 15:15:37 +0100 |
commit | 2778d49e9d4804d08b01407884520ffe00b94a95 (patch) | |
tree | aee2154e43841b3c4f44031c5cd94de4f5cffc4f /searchlib | |
parent | e1977829a79d9c7598fc99627861c6a822d16318 (diff) | |
parent | b1ed9bb59141ad556f376a2cf0c27f982d3b7f79 (diff) |
Merge pull request #15921 from vespa-engine/balder/let-updates-that-does-not-add-2-corpus-through
Allow updates with only remove/clear updates and operations to singleā¦
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/index/docbuilder.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/index/docbuilder.cpp b/searchlib/src/vespa/searchlib/index/docbuilder.cpp index a5557a59464..47781b3556c 100644 --- a/searchlib/src/vespa/searchlib/index/docbuilder.cpp +++ b/searchlib/src/vespa/searchlib/index/docbuilder.cpp @@ -618,7 +618,7 @@ DocBuilder::DocumentHandle::DocumentHandle(document::Document &doc, DocBuilder::DocBuilder(const Schema &schema) : _schema(schema), _doctypes_config(DocTypeBuilder(schema).makeConfig()), - _repo(new DocumentTypeRepo(_doctypes_config)), + _repo(std::make_shared<DocumentTypeRepo>(_doctypes_config)), _docType(*_repo->getDocumentType("searchdocument")), _doc(), _handleDoc(), @@ -626,14 +626,14 @@ DocBuilder::DocBuilder(const Schema &schema) { } -DocBuilder::~DocBuilder() {} +DocBuilder::~DocBuilder() = default; DocBuilder & DocBuilder::startDocument(const vespalib::string & docId) { - _doc.reset(new Document(_docType, DocumentId(docId))); + _doc = std::make_unique<Document>(_docType, DocumentId(docId)); _doc->setRepo(*_repo); - _handleDoc.reset(new DocumentHandle(*_doc, docId)); + _handleDoc = std::make_shared<DocumentHandle>(*_doc, docId); return *this; } |