aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/searchview.h
diff options
context:
space:
mode:
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/server/searchview.h')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/searchview.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/searchview.h b/searchcore/src/vespa/searchcore/proton/server/searchview.h
index 28c7ffd2b36..630d29c32fd 100644
--- a/searchcore/src/vespa/searchcore/proton/server/searchview.h
+++ b/searchcore/src/vespa/searchcore/proton/server/searchview.h
@@ -8,7 +8,7 @@
namespace proton {
-class SearchView : public ISearchHandler
+class SearchView : public ISearchHandler, public std::enable_shared_from_this<SearchView>
{
public:
using SessionManagerSP = std::shared_ptr<matching::SessionManager>;
@@ -16,12 +16,12 @@ public:
using InternalDocsumReply = std::pair<std::unique_ptr<DocsumReply>, bool>;
typedef std::shared_ptr<SearchView> SP;
- SearchView(const ISummaryManager::ISummarySetup::SP &summarySetup, const MatchView::SP &matchView);
+ static std::shared_ptr<SearchView> create(ISummaryManager::ISummarySetup::SP summarySetup, MatchView::SP matchView);
SearchView(const SearchView &) = delete;
SearchView(SearchView &&) = delete;
SearchView &operator=(const SearchView &) = delete;
SearchView &operator=(SearchView &&) = delete;
- ~SearchView();
+ ~SearchView() override;
const ISummaryManager::ISummarySetup::SP & getSummarySetup() const { return _summarySetup; }
const MatchView::SP & getMatchView() const { return _matchView; }
@@ -34,8 +34,9 @@ public:
matching::MatchingStats getMatcherStats(const vespalib::string &rankProfile) const { return _matchView->getMatcherStats(rankProfile); }
std::unique_ptr<DocsumReply> getDocsums(const DocsumRequest & req) override;
- std::unique_ptr<SearchReply> match(const ISearchHandler::SP &self, const SearchRequest &req, vespalib::ThreadBundle &threadBundle) const override;
+ std::unique_ptr<SearchReply> match(const SearchRequest &req, vespalib::ThreadBundle &threadBundle) const override;
private:
+ SearchView(ISummaryManager::ISummarySetup::SP summarySetup, MatchView::SP matchView);
InternalDocsumReply getDocsumsInternal(const DocsumRequest & req);
ISummaryManager::ISummarySetup::SP _summarySetup;
MatchView::SP _matchView;