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

#pragma once

#include <vespa/document/fieldvalue/document.h>
#include <vespa/searchcommon/attribute/iattributevector.h>
#include <vespa/searchlib/query/base.h>

namespace proton {

/**
 * Class used to retrieve a document field and populate it with the content from an attribute vector.
 */
struct DocumentFieldRetriever
{
    static void populate(search::DocumentIdT lid,
                         document::Document &doc,
                         const document::Field &field,
                         const search::attribute::IAttributeVector &attr);
};

} // namespace proton