aboutsummaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-04-21 21:56:55 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-04-22 08:08:05 +0000
commitd5add2f4c82db7088212e550f7c768317f009d53 (patch)
tree34bd3800c03f2720c6750059baea04ffcbb78702 /searchcommon
parentb8c7f42862d1557817e1a291bb5f06096afabee8 (diff)
Support both case sensitive, and case-insensitive search in non-fast-search attributes.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/config.cpp3
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/config.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.cpp b/searchcommon/src/vespa/searchcommon/attribute/config.cpp
index 065e9c14de9..c62d7ef0ea1 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),
+ _match(Match::UNCASED),
_dictionary(),
_growStrategy(),
_compactionStrategy(),
@@ -34,6 +35,7 @@ Config::Config(BasicType bt, CollectionType ct, bool fastSearch_, bool huge_) no
_isFilter(false),
_fastAccess(false),
_mutable(false),
+ _match(Match::UNCASED),
_dictionary(),
_growStrategy(),
_compactionStrategy(),
@@ -62,6 +64,7 @@ Config::operator==(const Config &b) const
_isFilter == b._isFilter &&
_fastAccess == b._fastAccess &&
_mutable == b._mutable &&
+ _match == b._match &&
_dictionary == b._dictionary &&
_growStrategy == b._growStrategy &&
_compactionStrategy == b._compactionStrategy &&
diff --git a/searchcommon/src/vespa/searchcommon/attribute/config.h b/searchcommon/src/vespa/searchcommon/attribute/config.h
index c1b30303606..fdf3a00ac99 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/config.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/config.h
@@ -22,6 +22,7 @@ namespace search::attribute {
*/
class Config {
public:
+ enum class Match { CASED, UNCASED };
Config() noexcept;
Config(BasicType bt) noexcept : Config(bt, CollectionType::SINGLE) { }
Config(BasicType bt, CollectionType ct) noexcept : Config(bt, ct, false) { }
@@ -68,6 +69,7 @@ public:
const GrowStrategy & getGrowStrategy() const { return _growStrategy; }
const CompactionStrategy &getCompactionStrategy() const { return _compactionStrategy; }
const DictionaryConfig & get_dictionary_config() const { return _dictionary; }
+ Match get_match() const { return _match; }
Config & setHuge(bool v) { _huge = v; return *this;}
Config & setFastSearch(bool v) { _fastSearch = v; return *this; }
Config & setPredicateParams(const PredicateParams &v) { _predicateParams = v; return *this; }
@@ -121,6 +123,7 @@ public:
return *this;
}
Config & set_dictionary_config(const DictionaryConfig & cfg) { _dictionary = cfg; return *this; }
+ Config & set_match(Match match) { _match = match; return *this; }
bool operator!=(const Config &b) const { return !(operator==(b)); }
bool operator==(const Config &b) const;
@@ -134,6 +137,7 @@ private:
bool _isFilter;
bool _fastAccess;
bool _mutable;
+ Match _match;
DictionaryConfig _dictionary;
GrowStrategy _growStrategy;
CompactionStrategy _compactionStrategy;