aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/searchhandlerproxy.cpp
blob: f2343b615793bb8683580dca307813a59c0218f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "searchhandlerproxy.h"
#include "documentdb.h"
#include <vespa/searchlib/engine/searchreply.h>
#include <vespa/searchlib/engine/docsumreply.h>

namespace proton {

SearchHandlerProxy::SearchHandlerProxy(DocumentDB::SP documentDB)
    : _documentDB(std::move(documentDB)),
      _retainGuard(_documentDB->retain())
{ }

SearchHandlerProxy::~SearchHandlerProxy() = default;

std::unique_ptr<search::engine::DocsumReply>
SearchHandlerProxy::getDocsums(const DocsumRequest & request)
{
    return _documentDB->getDocsums(request);
}

std::unique_ptr<search::engine::SearchReply>
SearchHandlerProxy::match(const SearchRequest &req, vespalib::ThreadBundle &threadBundle) const
{
    return _documentDB->match(req, threadBundle);
}

} // namespace proton