aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/common/doctypename.cpp
blob: 70daeeebecab2741763516deabe633b22ae750fe (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 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "doctypename.h"
#include <vespa/searchlib/engine/request.h>
#include <vespa/document/datatype/documenttype.h>

namespace proton
{


DocTypeName::DocTypeName(const search::engine::Request &request)
    : _name(request.propertiesMap.matchProperties().lookup("documentdb", "searchdoctype").get(""))
{
}


DocTypeName::DocTypeName(const document::DocumentType &docType)
    : _name(docType.getName())
{
}


} // namespace proton