summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-12-12 13:47:11 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-12-12 13:47:11 +0000
commit81487d4843b65c66f2f14a3346f3b6b51b85e245 (patch)
treef5fd47779d893464b0938eac46a2d12afd9b1daf /searchcore
parent3f54d4088502406eda15288bde29a16f6c810751 (diff)
Unify on using reference where possible.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/matching/match_phase_limiter/match_phase_limiter_test.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/query.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/requestcontext.h2
-rw-r--r--searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp2
5 files changed, 7 insertions, 7 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 67490c03985..824ee891873 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
@@ -69,7 +69,7 @@ struct MockBlueprint : SimpleLeafBlueprint {
FieldSpec spec;
vespalib::string term;
bool postings_fetched = false;
- search::queryeval::ExecuteInfo postings_strict = search::queryeval::ExecuteInfo::FALSE;
+ bool postings_strict = false;
MockBlueprint(const FieldSpec &spec_in, const vespalib::string &term_in)
: SimpleLeafBlueprint(spec_in), spec(spec_in), term(term_in)
{
@@ -78,7 +78,7 @@ struct MockBlueprint : SimpleLeafBlueprint {
SearchIterator::UP createLeafSearch(const TermFieldMatchDataArray &tfmda, bool strict) const override
{
if (postings_fetched) {
- EXPECT_EQUAL(postings_strict.is_strict(), strict);
+ EXPECT_EQUAL(postings_strict, strict);
}
return std::make_unique<MockSearch>(spec, term, strict, tfmda, postings_fetched);
}
@@ -86,7 +86,7 @@ struct MockBlueprint : SimpleLeafBlueprint {
return create_default_filter(strict, constraint);
}
void fetchPostings(const search::queryeval::ExecuteInfo &execInfo) override {
- postings_strict = execInfo;
+ postings_strict = execInfo.is_strict();
postings_fetched = true;
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index dc1596b9d16..527f7702a7c 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -208,7 +208,7 @@ MatchToolsFactory(QueryLimiter & queryLimiter,
double hitRate = std::min(1.0, double(maxNumHits)/double(searchContext.getDocIdLimit()));
bool create_postinglist_when_non_strict = CreatePostingListWhenNonStrict::check(_queryEnv.getProperties(), rankSetup.create_postinglist_when_non_strict());
bool use_estimate_for_fetch_postings = UseEstimateForFetchPostings::check(_queryEnv.getProperties(), rankSetup.use_estimate_for_fetch_postings());
- _query.fetchPostings(ExecuteInfo::create(is_search, hitRate, &_requestContext.getDoom(), &thread_bundle,
+ _query.fetchPostings(ExecuteInfo::create(is_search, hitRate, &_requestContext.getDoom(), thread_bundle,
create_postinglist_when_non_strict, use_estimate_for_fetch_postings));
if (is_search) {
_query.handle_global_filter(_requestContext, searchContext.getDocIdLimit(),
diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
index 451a891312c..027625a2a57 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp
@@ -217,7 +217,7 @@ Query::handle_global_filter(const IRequestContext & requestContext, uint32_t doc
bool create_postinglist_when_non_strict, bool use_estimate_for_fetch_postings)
{
if (!handle_global_filter(*_blueprint, docid_limit, global_filter_lower_limit, global_filter_upper_limit,
- *requestContext.thread_bundle(), &trace))
+ requestContext.thread_bundle(), &trace))
{
return;
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h
index d843035791d..c2721fd18ed 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/requestcontext.h
@@ -31,7 +31,7 @@ public:
const MetaStoreReadGuardSP * metaStoreReadGuard);
const Doom & getDoom() const override { return _doom; }
- vespalib::ThreadBundle * thread_bundle() const override { return &_thread_bundle; }
+ vespalib::ThreadBundle & thread_bundle() const override { return _thread_bundle; }
const search::attribute::IAttributeVector *getAttribute(const vespalib::string &name) const override;
void asyncForAttribute(const vespalib::string &name, std::unique_ptr<IAttributeFunctor> func) const override;
diff --git a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp
index bd6dc6da558..5d5348de52a 100644
--- a/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp
+++ b/searchcore/src/vespa/searchcorespi/index/warmupindexcollection.cpp
@@ -38,7 +38,7 @@ public:
explicit WarmupRequestContext(const vespalib::Clock & clock);
~WarmupRequestContext() override;
const vespalib::Doom & getDoom() const override { return _doom; }
- vespalib::ThreadBundle * thread_bundle() const override { return nullptr; }
+ vespalib::ThreadBundle & thread_bundle() const override { return vespalib::ThreadBundle::trivial(); }
const IAttributeVector *getAttribute(const vespalib::string &) const override { return nullptr; }
const IAttributeVector *getAttributeStableEnum(const vespalib::string &) const override { return nullptr; }
const vespalib::eval::Value* get_query_tensor(const vespalib::string&) const override;