summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-22 13:27:25 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-22 13:27:25 +0200
commitca9e189a2c430a85aca92ad8f39ed6642b117c83 (patch)
tree1329e333728a2ac9da5fd41f17b7d3d368c8132e /searchcore
parentbe11fc0adb411f7ff2b13cdee911620bc5ba0d76 (diff)
Reduce visibility.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingcontext.h8
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp17
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingmanager.h22
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingsession.cpp26
-rw-r--r--searchcore/src/vespa/searchcore/grouping/groupingsession.h43
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/result_processor.h7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h11
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.h5
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h9
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/matchview.h13
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.h3
19 files changed, 99 insertions, 100 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 4083a7e1194..650944d0f94 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -20,6 +20,7 @@
#include <vespa/searchcore/proton/server/fast_access_doc_subdb_configurer.h>
#include <vespa/searchcore/proton/server/summaryadapter.h>
#include <vespa/searchcore/proton/server/reconfig_params.h>
+#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcore/proton/test/documentdb_config_builder.h>
#include <vespa/searchcore/proton/test/mock_summary_adapter.h>
#include <vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h>
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingcontext.h b/searchcore/src/vespa/searchcore/grouping/groupingcontext.h
index 7ebc2c36985..92a9dc06fff 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingcontext.h
+++ b/searchcore/src/vespa/searchcore/grouping/groupingcontext.h
@@ -6,9 +6,7 @@
#include <vector>
#include <memory>
-namespace search {
-
-namespace grouping {
+namespace search::grouping {
/**
* A Grouping Context contains all grouping expressions that should be evaluated
@@ -115,6 +113,4 @@ public:
bool needRanking() const;
};
-} // namespace search::grouping
-} // namespace search
-
+}
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
index 7913043265a..48baba329ca 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
+++ b/searchcore/src/vespa/searchcore/grouping/groupingmanager.cpp
@@ -1,18 +1,18 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "groupingmanager.h"
+#include "groupingsession.h"
+#include "groupingcontext.h"
#include <vespa/searchlib/aggregation/fs4hit.h>
#include <vespa/searchlib/expression/attributenode.h>
-#include <vespa/searchcore/grouping/groupingsession.h>
#include <vespa/log/log.h>
LOG_SETUP(".groupingmanager");
-namespace search {
-namespace grouping {
+namespace search::grouping {
-using search::aggregation::Grouping;
-using search::attribute::IAttributeContext;
+using aggregation::Grouping;
+using attribute::IAttributeContext;
//-----------------------------------------------------------------------------
@@ -31,6 +31,10 @@ using search::expression::ConfigureStaticParams;
using search::aggregation::Grouping;
using search::aggregation::GroupingLevel;
+bool GroupingManager::empty() const {
+ return _groupingContext.getGroupingList().empty();
+}
+
void
GroupingManager::init(const IAttributeContext &attrCtx)
{
@@ -126,5 +130,4 @@ GroupingManager::convertToGlobalId(const search::IDocumentMetaStore &metaStore)
}
}
-} // namespace search::grouping
-} // namespace search
+}
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingmanager.h b/searchcore/src/vespa/searchcore/grouping/groupingmanager.h
index 1a440bf9247..5793c8576e5 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingmanager.h
+++ b/searchcore/src/vespa/searchcore/grouping/groupingmanager.h
@@ -2,12 +2,16 @@
#pragma once
#include <vespa/searchlib/common/idocumentmetastore.h>
-#include <vespa/searchlib/aggregation/grouping.h>
-#include <vespa/searchcore/grouping/groupingcontext.h>
+#include <vespa/searchcommon/attribute/iattributecontext.h>
namespace search {
+ class RankedHit;
+ class BitVector;
+}
-namespace grouping {
+namespace search::grouping {
+
+class GroupingContext;
/**
* Wrapper class used to handle actual grouping. All input data is
@@ -37,14 +41,14 @@ public:
/**
* @return true if this manager is holding an empty grouping request.
**/
- bool empty() const { return _groupingContext.getGroupingList().empty(); }
+ bool empty() const;
/**
* Initialize underlying context with attribute bindings.
*
* @param attrCtx attribute context
**/
- void init(const search::attribute::IAttributeContext &attrCtx);
+ void init(const attribute::IAttributeContext &attrCtx);
/**
* Perform actual grouping on the given results.
@@ -65,7 +69,7 @@ public:
* @param binSize size of search result array
* @param overflow The unranked hits.
**/
- void groupUnordered(const RankedHit *searchResults, uint32_t binSize, const search::BitVector * overflow);
+ void groupUnordered(const RankedHit *searchResults, uint32_t binSize, const BitVector * overflow);
/**
* Merge another grouping context into the underlying context of
@@ -89,9 +93,7 @@ public:
*
* @param metaStore the attribute used to map from lid to gid.
**/
- void convertToGlobalId(const search::IDocumentMetaStore &metaStore);
+ void convertToGlobalId(const IDocumentMetaStore &metaStore);
};
-} // namespace search::grouping
-} // namespace search
-
+}
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp b/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp
index 6407a29175e..110d032205e 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp
+++ b/searchcore/src/vespa/searchcore/grouping/groupingsession.cpp
@@ -1,11 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "groupingsession.h"
+#include "groupingmanager.h"
+#include "groupingcontext.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".groupingsession");
-namespace search {
-namespace grouping {
+namespace search::grouping {
using search::aggregation::Group;
using search::aggregation::Grouping;
@@ -16,8 +18,8 @@ GroupingSession::GroupingSession(const SessionId &sessionId,
GroupingContext & groupingContext,
const IAttributeContext &attrCtx)
: _sessionId(sessionId),
- _mgrContext(groupingContext),
- _groupingManager(_mgrContext),
+ _mgrContext(std::make_unique<GroupingContext>(groupingContext)),
+ _groupingManager(std::make_unique<GroupingManager>(*_mgrContext)),
_timeOfDoom(groupingContext.getTimeOfDoom())
{
init(groupingContext, attrCtx);
@@ -46,31 +48,30 @@ GroupingSession::init(GroupingContext & groupingContext, const IAttributeContext
_groupingMap[gp->getId()] = gp;
g = gp;
}
- _mgrContext.addGrouping(g);
+ _mgrContext->addGrouping(g);
}
- _groupingManager.init(attrCtx);
+ _groupingManager->init(attrCtx);
}
void
GroupingSession::prepareThreadContextCreation(size_t num_threads)
{
if (num_threads > 1) {
- _mgrContext.serialize(); // need copy of internal modified request
+ _mgrContext->serialize(); // need copy of internal modified request
}
}
GroupingContext::UP
GroupingSession::createThreadContext(size_t thread_id, const IAttributeContext &attrCtx)
{
- GroupingContext::UP ctx(new GroupingContext(_mgrContext));
+ GroupingContext::UP ctx(new GroupingContext(*_mgrContext));
if (thread_id == 0) {
- GroupingContext::GroupingList &groupingList = _mgrContext.getGroupingList();
+ GroupingContext::GroupingList &groupingList = _mgrContext->getGroupingList();
for (size_t i = 0; i < groupingList.size(); ++i) {
ctx->addGrouping(groupingList[i]);
}
} else {
- ctx->deserialize(_mgrContext.getResult().peek(),
- _mgrContext.getResult().size());
+ ctx->deserialize(_mgrContext->getResult().peek(), _mgrContext->getResult().size());
GroupingManager man(*ctx);
man.init(attrCtx);
}
@@ -97,5 +98,4 @@ GroupingSession::continueExecution(GroupingContext & groupingContext)
groupingContext.serialize();
}
-} // namespace search::grouping
-} // namespace search
+}
diff --git a/searchcore/src/vespa/searchcore/grouping/groupingsession.h b/searchcore/src/vespa/searchcore/grouping/groupingsession.h
index 62867289be7..95a5332b417 100644
--- a/searchcore/src/vespa/searchcore/grouping/groupingsession.h
+++ b/searchcore/src/vespa/searchcore/grouping/groupingsession.h
@@ -1,16 +1,17 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include "groupingmanager.h"
-#include "groupingcontext.h"
#include "sessionid.h"
-#include <vespa/searchlib/aggregation/grouping.h>
+#include <vespa/searchlib/attribute/iattributemanager.h>
+#include <vespa/fastos/timestamp.h>
+#include <vector>
#include <map>
+namespace search::aggregation { class Grouping; }
+namespace search::grouping {
-namespace search {
-
-namespace grouping {
+class GroupingContext;
+class GroupingManager;
/**
* A grouping session represents the execution of a grouping expression with one
@@ -21,15 +22,15 @@ namespace grouping {
class GroupingSession
{
private:
- typedef std::shared_ptr<search::aggregation::Grouping> GroupingPtr;
- typedef std::map<uint32_t, GroupingPtr> GroupingMap;
- typedef std::vector<GroupingPtr> GroupingList;
+ using GroupingPtr = std::shared_ptr<aggregation::Grouping>;
+ using GroupingMap = std::map<uint32_t, GroupingPtr>;
+ using GroupingList = std::vector<GroupingPtr>;
- SessionId _sessionId;
- GroupingContext _mgrContext;
- GroupingManager _groupingManager;
- GroupingMap _groupingMap;
- fastos::TimeStamp _timeOfDoom;
+ SessionId _sessionId;
+ std::unique_ptr<GroupingContext> _mgrContext;
+ std::unique_ptr<GroupingManager> _groupingManager;
+ GroupingMap _groupingMap;
+ fastos::TimeStamp _timeOfDoom;
public:
typedef std::unique_ptr<GroupingSession> UP;
@@ -43,7 +44,7 @@ public:
**/
GroupingSession(const SessionId & sessionId,
GroupingContext & groupingContext,
- const search::attribute::IAttributeContext &attrCtx);
+ const attribute::IAttributeContext &attrCtx);
GroupingSession(const GroupingSession &) = delete;
GroupingSession &operator=(const GroupingSession &) = delete;
@@ -62,8 +63,7 @@ public:
* @param groupingContext The current grouping context.
* @param attrCtx attribute context.
**/
- void init(GroupingContext & groupingContext,
- const search::attribute::IAttributeContext &attrCtx);
+ void init(GroupingContext & groupingContext, const attribute::IAttributeContext &attrCtx);
/**
* This function is called to prepare for creation of individual
@@ -85,13 +85,12 @@ public:
* @param thread_id thread id
* @param attrCtx attribute context.
**/
- GroupingContext::UP createThreadContext(size_t thread_id,
- const search::attribute::IAttributeContext &attrCtx);
+ std::unique_ptr<GroupingContext> createThreadContext(size_t thread_id, const attribute::IAttributeContext &attrCtx);
/**
* Return the GroupingManager to use when performing grouping.
**/
- GroupingManager & getGroupingManager() { return _groupingManager; }
+ GroupingManager & getGroupingManager() { return *_groupingManager; }
/**
* Continue excuting a query given a context.
@@ -112,6 +111,4 @@ public:
fastos::TimeStamp getTimeOfDoom() const { return _timeOfDoom; }
};
-} // namespace search::grouping
-} // namespace search
-
+}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index 4ece0c65593..1d5abcc2929 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -9,13 +9,13 @@
#include <vespa/vespalib/util/closure.h>
#include <vespa/vespalib/util/thread_bundle.h>
#include <vespa/searchcore/grouping/groupingmanager.h>
+#include <vespa/searchcore/grouping/groupingcontext.h>
#include <vespa/searchlib/common/bitvector.h>
#include <vespa/log/log.h>
LOG_SETUP(".proton.matching.match_thread");
-namespace proton {
-namespace matching {
+namespace proton::matching {
using search::queryeval::OptimizedAndNotForBlackListing;
using search::queryeval::SearchIterator;
@@ -402,5 +402,4 @@ MatchThread::run()
mergeDirector.dualMerge(thread_id, *resultContext->result, resultContext->groupingSource);
}
-} // namespace proton::matching
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
index 9287089c34e..cd01c330931 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
@@ -15,8 +15,7 @@
#include <vespa/searchlib/common/sortresults.h>
#include <vespa/searchlib/queryeval/hitcollector.h>
-namespace proton {
-namespace matching {
+namespace proton::matching {
/**
* Runs a single match thread and keeps track of local state.
@@ -111,5 +110,4 @@ public:
PartialResult::UP extract_result() { return std::move(resultContext->result); }
};
-} // namespace proton::matching
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 852176e4918..32775d7619a 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -7,6 +7,7 @@
#include "match_params.h"
#include "matcher.h"
#include "sessionmanager.h"
+#include <vespa/searchcore/grouping/groupingcontext.h>
#include <vespa/searchlib/engine/errorcodes.h>
#include <vespa/searchlib/engine/docsumrequest.h>
#include <vespa/searchlib/engine/searchrequest.h>
diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp b/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
index 1e7acead748..e2c6affebe1 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
@@ -3,6 +3,8 @@
#include "result_processor.h"
#include "partial_result.h"
#include "sessionmanager.h"
+#include <vespa/searchcore/grouping/groupingmanager.h>
+#include <vespa/searchcore/grouping/groupingcontext.h>
#include <vespa/searchlib/common/docstamp.h>
#include <vespa/searchlib/uca/ucaconverter.h>
#include <vespa/searchlib/engine/searchreply.h>
@@ -15,8 +17,7 @@ using search::grouping::GroupingSession;
using search::grouping::GroupingContext;
using search::grouping::SessionId;
-namespace proton {
-namespace matching {
+namespace proton::matching {
ResultProcessor::Result::Result(std::unique_ptr<search::engine::SearchReply> reply, size_t numFs4Hits)
: _reply(std::move(reply)),
@@ -158,5 +159,4 @@ ResultProcessor::makeReply(PartialResultUP full_result)
return Result::UP(new Result(std::move(reply), numFs4Hits));
}
-} // namespace proton::matching
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
index 0a9b88c066a..a181c1660b7 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
@@ -16,8 +16,7 @@ namespace search {
class IDocumentMetaStore;
}
-namespace proton {
-namespace matching {
+namespace proton::matching {
class SessionManager;
class PartialResult;
@@ -107,6 +106,4 @@ public:
std::unique_ptr<Result> makeReply(PartialResultUP full_result);
};
-} // namespace proton::matching
-} // namespace proton
-
+}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp
index f6fd7f7cc9d..e456ea5b5a2 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.cpp
@@ -1,14 +1,14 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "session_manager_explorer.h"
+#include "sessionmanager.h"
#include <vespa/vespalib/data/slime/slime.h>
using vespalib::slime::Inserter;
using vespalib::slime::Cursor;
using vespalib::StateExplorer;
-namespace proton {
-namespace matching {
+namespace proton::matching {
namespace {
@@ -59,5 +59,4 @@ SessionManagerExplorer::get_child(vespalib::stringref name) const
return std::unique_ptr<StateExplorer>(nullptr);
}
-} // namespace proton::matching
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h
index 31dabc5a887..b8acfba0342 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/session_manager_explorer.h
@@ -2,11 +2,11 @@
#pragma once
-#include "sessionmanager.h"
#include <vespa/vespalib/net/state_explorer.h>
-namespace proton {
-namespace matching {
+namespace proton::matching {
+
+class SessionManager;
/**
* Class used to explore the state of a session manager
@@ -20,8 +20,7 @@ public:
SessionManagerExplorer(const SessionManager &manager) : _manager(manager) {}
virtual void get_state(const vespalib::slime::Inserter &inserter, bool full) const override;
virtual std::vector<vespalib::string> get_children_names() const override;
- virtual std::unique_ptr<StateExplorer> get_child(vespalib::stringref name) const override;
+ virtual std::unique_ptr<vespalib::StateExplorer> get_child(vespalib::stringref name) const override;
};
-} // namespace proton::matching
-} // namespace proton
+}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
index 2156d853ac4..6773798d2d7 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h
@@ -21,7 +21,6 @@
#include <vespa/searchcore/proton/common/doctypename.h>
#include <vespa/searchcore/proton/common/monitored_refcount.h>
-#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcore/proton/metrics/documentdb_job_trackers.h>
#include <vespa/searchcore/proton/metrics/documentdb_metrics_collection.h>
#include <vespa/searchcore/proton/persistenceengine/bucket_guard.h>
@@ -44,6 +43,8 @@ class IDocumentDBOwner;
class MetricsWireService;
class StatusReport;
+namespace matching { class SessionManager; }
+
/**
* The document database contains all the necessary structures required per
* document type. It has an internal single-threaded Executor to process input
@@ -110,7 +111,7 @@ private:
ProtonConfig::Summary _protonSummaryCfg;
ProtonConfig::Index _protonIndexCfg;
ConfigStore::UP _config_store;
- matching::SessionManager::SP _sessionManager; // TODO: This should not have to be a shared pointer.
+ std::shared_ptr<matching::SessionManager> _sessionManager; // TODO: This should not have to be a shared pointer.
MetricsWireService &_metricsWireService;
MetricsUpdateHook _metricsHook;
vespalib::VarHolder<IFeedView::SP> _feedView;
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
index c4ff03de6a1..c89a63b95c0 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.h
@@ -60,8 +60,8 @@ public:
};
private:
- typedef vespa::config::search::AttributesConfig AttributesConfig;
- typedef FastAccessDocSubDBConfigurer Configurer;
+ using AttributesConfig = vespa::config::search::AttributesConfig;
+ using Configurer = FastAccessDocSubDBConfigurer;
const bool _hasAttributes;
const bool _fastAccessAttributesOnly;
@@ -81,7 +81,8 @@ private:
void initFeedView(const IAttributeWriter::SP &writer, const DocumentDBConfig &configSnapshot);
protected:
- typedef StoreOnlyDocSubDB Parent;
+ using Parent = StoreOnlyDocSubDB;
+ using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
const bool _addMetrics;
MetricsWireService &_metricsWireService;
@@ -110,7 +111,7 @@ public:
void setup(const DocumentSubDbInitializerResult &initResult) override;
void initViews(const DocumentDBConfig &configSnapshot,
- const matching::SessionManager::SP &sessionManager) override;
+ const SessionManagerSP &sessionManager) override;
IReprocessingTask::List applyConfig(const DocumentDBConfig &newConfigSnapshot,
const DocumentDBConfig &oldConfigSnapshot,
diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
index 0f38e48a8e2..3162f9a1c45 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.cpp
@@ -33,7 +33,7 @@ using matching::SessionManager;
MatchView::MatchView(const Matchers::SP &matchers,
const IndexSearchable::SP &indexSearchable,
const IAttributeManager::SP &attrMgr,
- const SessionManager::SP &sessionMgr,
+ const SessionManagerSP &sessionMgr,
const IDocumentMetaStoreContext::SP &metaStore,
DocIdLimit &docIdLimit)
: _matchers(matchers),
@@ -44,6 +44,7 @@ MatchView::MatchView(const Matchers::SP &matchers,
_docIdLimit(docIdLimit)
{ }
+MatchView::~MatchView() { }
Matcher::SP
MatchView::getMatcher(const vespalib::string & rankProfile) const
diff --git a/searchcore/src/vespa/searchcore/proton/server/matchview.h b/searchcore/src/vespa/searchcore/proton/server/matchview.h
index 5207bce9288..511048f536f 100644
--- a/searchcore/src/vespa/searchcore/proton/server/matchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/matchview.h
@@ -8,17 +8,20 @@
#include <vespa/searchcore/proton/documentmetastore/documentmetastorecontext.h>
#include <vespa/searchcore/proton/matching/match_context.h>
#include <vespa/searchcore/proton/matching/matcher.h>
-#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <vespa/searchcorespi/index/indexsearchable.h>
#include <vespa/searchlib/attribute/attributevector.h>
namespace proton {
+namespace matching {
+ class SessionManager;
+}
class MatchView {
+ using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
Matchers::SP _matchers;
searchcorespi::IndexSearchable::SP _indexSearchable;
IAttributeManager::SP _attrMgr;
- matching::SessionManager::SP _sessionMgr;
+ SessionManagerSP _sessionMgr;
IDocumentMetaStoreContext::SP _metaStore;
DocIdLimit &_docIdLimit;
@@ -34,14 +37,15 @@ public:
MatchView(const Matchers::SP &matchers,
const searchcorespi::IndexSearchable::SP &indexSearchable,
const IAttributeManager::SP &attrMgr,
- const matching::SessionManager::SP &sessionMgr,
+ const SessionManagerSP &sessionMgr,
const IDocumentMetaStoreContext::SP &metaStore,
DocIdLimit &docIdLimit);
+ ~MatchView();
const Matchers::SP & getMatchers() const { return _matchers; }
const searchcorespi::IndexSearchable::SP & getIndexSearchable() const { return _indexSearchable; }
const IAttributeManager::SP & getAttributeManager() const { return _attrMgr; }
- const matching::SessionManager::SP & getSessionManager() const { return _sessionMgr; }
+ const SessionManagerSP & getSessionManager() const { return _sessionMgr; }
const IDocumentMetaStoreContext::SP & getDocumentMetaStore() const { return _metaStore; }
DocIdLimit & getDocIdLimit() const { return _docIdLimit; }
@@ -62,4 +66,3 @@ public:
};
} // namespace proton
-
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
index 7bd6c1ef100..e790638aa4f 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchabledocsubdb.h
@@ -126,7 +126,7 @@ public:
void
initViews(const DocumentDBConfig &configSnapshot,
- const matching::SessionManager::SP &sessionManager) override;
+ const SessionManagerSP &sessionManager) override;
IReprocessingTask::List
applyConfig(const DocumentDBConfig &newConfigSnapshot,
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.h b/searchcore/src/vespa/searchcore/proton/server/searchview.h
index cb1cd7670bc..186d6154706 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.h
@@ -11,6 +11,7 @@ namespace proton {
class SearchView : public ISearchHandler
{
public:
+ using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
using IndexSearchable = searchcorespi::IndexSearchable;
using InternalDocsumReply = std::pair<std::unique_ptr<DocsumReply>, bool>;
typedef std::shared_ptr<SearchView> SP;
@@ -25,7 +26,7 @@ public:
const Matchers::SP & getMatchers() const { return _matchView->getMatchers(); }
const IndexSearchable::SP & getIndexSearchable() const { return _matchView->getIndexSearchable(); }
const IAttributeManager::SP & getAttributeManager() const { return _matchView->getAttributeManager(); }
- const matching::SessionManager::SP & getSessionManager() const { return _matchView->getSessionManager(); }
+ const SessionManagerSP & getSessionManager() const { return _matchView->getSessionManager(); }
const IDocumentMetaStoreContext::SP & getDocumentMetaStore() const { return _matchView->getDocumentMetaStore(); }
DocIdLimit &getDocIdLimit() const { return _matchView->getDocIdLimit(); }
matching::MatchingStats getMatcherStats(const vespalib::string &rankProfile) const { return _matchView->getMatcherStats(rankProfile); }