summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-09-12 11:14:22 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-09-12 11:14:22 +0000
commit199b282a61ad84305d9e8549d18513312190f07f (patch)
tree2c680f5f1e9e6fd851134c9d7e1fa24ed5dfa717
parent4b77745ecb275f341d8bb673f6f960235ad0e18a (diff)
Remove void TODO, and mark some methods const.
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp9
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.h8
2 files changed, 8 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index d67bee12d48..e8c7f2c5e44 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -278,7 +278,6 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl
SearchReply::Coverage & coverage = reply->coverage;
coverage.setActive(numActiveLids);
- //TODO this should be calculated with ClusterState calculator.
coverage.setTargetActive(bucketdb.getNumActiveDocs());
coverage.setCovered(covered);
if (wasLimited) {
@@ -324,7 +323,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl
FeatureSet::SP
Matcher::getSummaryFeatures(const DocsumRequest & req, ISearchContext & searchCtx,
- IAttributeContext & attrCtx, SessionManager &sessionMgr)
+ IAttributeContext & attrCtx, SessionManager &sessionMgr) const
{
auto docsum_matcher = create_docsum_matcher(req, searchCtx, attrCtx, sessionMgr);
return docsum_matcher->get_summary_features();
@@ -332,7 +331,7 @@ Matcher::getSummaryFeatures(const DocsumRequest & req, ISearchContext & searchCt
FeatureSet::SP
Matcher::getRankFeatures(const DocsumRequest & req, ISearchContext & searchCtx,
- IAttributeContext & attrCtx, SessionManager &sessionMgr)
+ IAttributeContext & attrCtx, SessionManager &sessionMgr) const
{
auto docsum_matcher = create_docsum_matcher(req, searchCtx, attrCtx, sessionMgr);
return docsum_matcher->get_rank_features();
@@ -341,7 +340,7 @@ Matcher::getRankFeatures(const DocsumRequest & req, ISearchContext & searchCtx,
MatchingElements::UP
Matcher::get_matching_elements(const DocsumRequest &req, ISearchContext &search_ctx,
IAttributeContext &attr_ctx, SessionManager &session_manager,
- const MatchingElementsFields &fields)
+ const MatchingElementsFields &fields) const
{
auto docsum_matcher = create_docsum_matcher(req, search_ctx, attr_ctx, session_manager);
return docsum_matcher->get_matching_elements(fields);
@@ -349,7 +348,7 @@ Matcher::get_matching_elements(const DocsumRequest &req, ISearchContext &search_
DocsumMatcher::UP
Matcher::create_docsum_matcher(const DocsumRequest &req, ISearchContext &search_ctx,
- IAttributeContext &attr_ctx, SessionManager &session_manager)
+ IAttributeContext &attr_ctx, SessionManager &session_manager) const
{
std::vector<uint32_t> docs;
docs.reserve(req.hits.size());
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.h b/searchcore/src/vespa/searchcore/proton/matching/matcher.h
index 81fa6de211c..409f0ddeae5 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.h
@@ -136,7 +136,7 @@ public:
**/
search::FeatureSet::SP
getSummaryFeatures(const DocsumRequest & req, ISearchContext & searchCtx,
- IAttributeContext & attrCtx, SessionManager &sessionManager);
+ IAttributeContext & attrCtx, SessionManager &sessionManager) const;
/**
* Perform matching for the documents in the given docsum request
@@ -150,7 +150,7 @@ public:
**/
search::FeatureSet::SP
getRankFeatures(const DocsumRequest & req, ISearchContext & searchCtx,
- IAttributeContext & attrCtx, SessionManager &sessionManager);
+ IAttributeContext & attrCtx, SessionManager &sessionManager) const;
/**
* Perform partial matching for the documents in the given docsum request
@@ -166,10 +166,10 @@ public:
**/
MatchingElements::UP get_matching_elements(const DocsumRequest &req, ISearchContext &search_ctx,
IAttributeContext &attr_ctx, SessionManager &session_manager,
- const MatchingElementsFields &fields);
+ const MatchingElementsFields &fields) const;
DocsumMatcher::UP create_docsum_matcher(const DocsumRequest &req, ISearchContext &search_ctx,
- IAttributeContext &attr_ctx, SessionManager &session_manager);
+ IAttributeContext &attr_ctx, SessionManager &session_manager) const;
/**
* @return true if this rankprofile has summary-features enabled