aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/common/doctypename.cpp
blob: 5a3eed04a60c48806894f4ebb786f863d34c0629 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Yahoo. 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) noexcept
    : _name(request.propertiesMap.matchProperties().lookup("documentdb", "searchdoctype").get(""))
{}


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

}