aboutsummaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-08-12 06:21:54 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-08-12 06:21:54 +0000
commit96d88f5e9273060bb8d264e2988cb854048cf1d6 (patch)
treea69f1c3cf4417cc8248212c0fc6bc79b82b4d3ee /searchcommon
parentd7f026fdc2bbe507da717f45c0a8704291cff16f (diff)
Add swapable attribute option.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/config.cpp3
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/config.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.cpp b/searchcommon/src/vespa/searchcommon/attribute/config.cpp
index c62d7ef0ea1..23119ac8e1f 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/config.cpp
+++ b/searchcommon/src/vespa/searchcommon/attribute/config.cpp
@@ -14,6 +14,7 @@ Config::Config() noexcept :
_isFilter(false),
_fastAccess(false),
_mutable(false),
+ _swapable(false),
_match(Match::UNCASED),
_dictionary(),
_growStrategy(),
@@ -35,6 +36,7 @@ Config::Config(BasicType bt, CollectionType ct, bool fastSearch_, bool huge_) no
_isFilter(false),
_fastAccess(false),
_mutable(false),
+ _swapable(false),
_match(Match::UNCASED),
_dictionary(),
_growStrategy(),
@@ -64,6 +66,7 @@ Config::operator==(const Config &b) const
_isFilter == b._isFilter &&
_fastAccess == b._fastAccess &&
_mutable == b._mutable &&
+ _swapable == b._swapable &&
_match == b._match &&
_dictionary == b._dictionary &&
_growStrategy == b._growStrategy &&
diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.h b/searchcommon/src/vespa/searchcommon/attribute/config.h
index fdf3a00ac99..36bfe711029 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/config.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/config.h
@@ -40,6 +40,7 @@ public:
CollectionType collectionType() const { return _type; }
bool fastSearch() const { return _fastSearch; }
bool huge() const { return _huge; }
+ bool swapable() const { return _swapable; }
const PredicateParams &predicateParams() const { return _predicateParams; }
const vespalib::eval::ValueType & tensorType() const { return _tensorType; }
DistanceMetric distance_metric() const { return _distance_metric; }
@@ -116,6 +117,7 @@ public:
*/
Config & setIsFilter(bool isFilter) { _isFilter = isFilter; return *this; }
Config & setMutable(bool isMutable) { _mutable = isMutable; return *this; }
+ Config & setSwapable(bool isSwapable) { _swapable = isSwapable; return *this; }
Config & setFastAccess(bool v) { _fastAccess = v; return *this; }
Config & setGrowStrategy(const GrowStrategy &gs) { _growStrategy = gs; return *this; }
Config & setCompactionStrategy(const CompactionStrategy &compactionStrategy) {
@@ -137,6 +139,7 @@ private:
bool _isFilter;
bool _fastAccess;
bool _mutable;
+ bool _swapable;
Match _match;
DictionaryConfig _dictionary;
GrowStrategy _growStrategy;