blob: f4a604d783cd1c7080ea03b4e7f0f9bf09e71ed8 (
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
30
31
32
33
34
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "documentretrieverbase.h"
namespace search { class IDocumentStore; }
namespace proton {
/**
* The document retriever used by the store-only sub database.
*
* Handles retrieving of documents from the underlying document store.
*/
class MinimalDocumentRetriever : public DocumentRetrieverBase
{
const std::shared_ptr<const document::DocumentTypeRepo> _repo;
const search::IDocumentStore &_doc_store;
public:
// meta_store and doc_store must out-live the MinimalDocumentRetriever.
MinimalDocumentRetriever(const DocTypeName &docTypeName,
const std::shared_ptr<const document::DocumentTypeRepo> repo,
const IDocumentMetaStoreContext &meta_store,
const search::IDocumentStore &doc_store,
bool hasFields);
~MinimalDocumentRetriever() override;
document::Document::UP getFullDocument(search::DocumentIdT lid) const override;
void visitDocuments(const LidVector & lids, search::IDocumentVisitor & visitor, ReadConsistency) const override;
};
} // namespace proton
|