aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/docsummary/documentstoreadapter.h
blob: 308a85baf9696dc282986aa46ed463fc14e755f6 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/searchsummary/docsummary/docsumstore.h>
#include <vespa/searchlib/docstore/idocumentstore.h>

namespace proton {

class DocumentStoreAdapter : public search::docsummary::IDocsumStore
{
private:
    const search::IDocumentStore           & _docStore;
    const document::DocumentTypeRepo       & _repo;

public:
    DocumentStoreAdapter(const search::IDocumentStore &docStore,
                         const document::DocumentTypeRepo &repo);
    ~DocumentStoreAdapter();

    std::unique_ptr<const search::docsummary::IDocsumStoreDocument> get_document(uint32_t docId) override;
};

} // namespace proton