diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-05-12 18:09:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 18:09:29 +0200 |
commit | aff2a48b41d3014883f450ddbcafe5df58f8cbe4 (patch) | |
tree | 54ea044088444740d215300b1dced89cc63edea5 /searchcore | |
parent | adb58e0d4ffca0fdd590f99f10b10e424d8d42c9 (diff) | |
parent | 8444b221bf0513c45234b84924785abf436f4bec (diff) |
Merge pull request #27080 from vespa-engine/balder/avoid-copying-fieldspecbase-vector
Move the fieldspec base vector.
Diffstat (limited to 'searchcore')
3 files changed, 4 insertions, 5 deletions
diff --git a/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp b/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp index 45ac0a8f924..2cb82fabc4c 100644 --- a/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp +++ b/searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp @@ -71,7 +71,7 @@ struct MockBlueprint : SimpleLeafBlueprint { bool postings_fetched = false; search::queryeval::ExecuteInfo postings_strict = search::queryeval::ExecuteInfo::FALSE; MockBlueprint(const FieldSpec &spec_in, const vespalib::string &term_in) - : SimpleLeafBlueprint(FieldSpecBaseList().add(spec_in)), spec(spec_in), term(term_in) + : SimpleLeafBlueprint(spec_in), spec(spec_in), term(term_in) { setEstimate(HitEstimate(756, false)); } diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp index 7b7d590d913..162db5d8760 100644 --- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp +++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp @@ -213,7 +213,7 @@ private: } public: WhiteListBlueprint(const search::BitVector &activeLids, bool all_lids_active) - : SimpleLeafBlueprint(FieldSpecBaseList()), + : SimpleLeafBlueprint(), _activeLids(activeLids), _all_lids_active(all_lids_active), _lock(), diff --git a/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp b/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp index 2d3323949d1..eee2b7a7203 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp @@ -2,7 +2,6 @@ #include "blueprintbuilder.h" #include "querynodes.h" -#include "termdatafromnode.h" #include "same_element_builder.h" #include <vespa/searchcorespi/index/indexsearchable.h> #include <vespa/searchlib/query/tree/customtypevisitor.h> @@ -25,7 +24,7 @@ struct Mixer { void addAttribute(Blueprint::UP attr) { if (attributes.get() == 0) { - attributes.reset(new OrBlueprint()); + attributes = std::make_unique<OrBlueprint>(); } attributes->addChild(std::move(attr)); } @@ -92,7 +91,7 @@ private: for (size_t i = 0; i < n.numFields(); ++i) { specs.add(n.field(i).fieldSpec()); } - EquivBlueprint *eq = new EquivBlueprint(specs, n.children_mdl); + EquivBlueprint *eq = new EquivBlueprint(std::move(specs), n.children_mdl); _result.reset(eq); for (size_t i = 0; i < n.getChildren().size(); ++i) { search::query::Node &node = *n.getChildren()[i]; |