diff options
author | Håvard Pettersen <havardpe@oath.com> | 2019-09-10 11:18:29 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2019-09-12 08:16:57 +0000 |
commit | 17a6c5033b0b45becf8a3ef382d51599fe9afd57 (patch) | |
tree | 9fd3fa6e56547ea28dd024e0acdb6f886c9c17a0 /searchcore | |
parent | d385fbe52c37b1bf896a4e16328349ac756ee4f4 (diff) |
add expensive flags to phrase/same element
they will affect the iterator cost tier
Diffstat (limited to 'searchcore')
4 files changed, 5 insertions, 5 deletions
diff --git a/searchcore/src/tests/proton/matching/same_element_builder/same_element_builder_test.cpp b/searchcore/src/tests/proton/matching/same_element_builder/same_element_builder_test.cpp index 0fc84e26bba..6583f3bc00b 100644 --- a/searchcore/src/tests/proton/matching/same_element_builder/same_element_builder_test.cpp +++ b/searchcore/src/tests/proton/matching/same_element_builder/same_element_builder_test.cpp @@ -90,7 +90,7 @@ struct BuilderFixture { FakeRequestContext req_ctx; FakeSearchContext ctx; SameElementBuilder builder; - BuilderFixture() : req_ctx(), ctx(), builder(req_ctx, ctx) { + BuilderFixture() : req_ctx(), ctx(), builder(req_ctx, ctx, false) { ctx.attr().tag("attr"); ctx.addIdx(0).idx(0).getFake().tag("idx"); } diff --git a/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp b/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp index 656e49d7569..380aeb82ad2 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/blueprintbuilder.cpp @@ -102,7 +102,7 @@ private: } void buildSameElement(ProtonSameElement &n) { - SameElementBuilder builder(_requestContext, _context); + SameElementBuilder builder(_requestContext, _context, n.is_expensive()); for (search::query::Node *node : n.getChildren()) { builder.add_child(*node); } diff --git a/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp b/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp index 16c86e8a4f5..8e012c52b5f 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.cpp @@ -71,10 +71,10 @@ public: } // namespace proton::matching::<unnamed> -SameElementBuilder::SameElementBuilder(const search::queryeval::IRequestContext &requestContext, ISearchContext &context) +SameElementBuilder::SameElementBuilder(const search::queryeval::IRequestContext &requestContext, ISearchContext &context, bool expensive) : _requestContext(requestContext), _context(context), - _result(std::make_unique<SameElementBlueprint>()) + _result(std::make_unique<SameElementBlueprint>(expensive)) { } diff --git a/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.h b/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.h index 945bb9a97f6..b9cfff8a9c0 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.h +++ b/searchcore/src/vespa/searchcore/proton/matching/same_element_builder.h @@ -16,7 +16,7 @@ private: ISearchContext &_context; std::unique_ptr<search::queryeval::SameElementBlueprint> _result; public: - SameElementBuilder(const search::queryeval::IRequestContext &requestContext, ISearchContext &context); + SameElementBuilder(const search::queryeval::IRequestContext &requestContext, ISearchContext &context, bool expensive); void add_child(search::query::Node &node); search::queryeval::Blueprint::UP build(); }; |