blob: ce7d0470a56c475c9467b4cfcd3a4b3d44c06f14 (
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 Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "attribute_utils.h"
#include "config.h"
namespace search::attribute {
bool
isUpdateableInMemoryOnly(const vespalib::string &attrName, const Config &cfg)
{
auto basicType = cfg.basicType().type();
return ((basicType != BasicType::Type::PREDICATE) &&
(basicType != BasicType::Type::REFERENCE)) &&
!isStructFieldAttribute(attrName);
}
bool
isStructFieldAttribute(const vespalib::string &attrName)
{
return attrName.find('.') != vespalib::string::npos;
}
}
|