aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/attribute/attribute_factory.cpp
blob: 45b1dc41057db935296216e0879d4d46744435e1 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "attribute_factory.h"
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.h>


namespace proton {

using search::AttributeVector;

AttributeFactory::AttributeFactory() = default;

AttributeVector::SP
AttributeFactory::create(const vespalib::string &name, const search::attribute::Config &cfg) const
{
    AttributeVector::SP v(search::AttributeFactory::createAttribute(name, cfg));
    return v;
}

void
AttributeFactory::setupEmpty(const AttributeVector::SP &vec, search::SerialNum serialNum) const
{
    vec->setCreateSerialNum(serialNum);
    vec->addReservedDoc();
}

}