From 384505ff39ab15c812d753853a7147e2c0440fca Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 8 Apr 2021 16:12:02 +0000 Subject: Wire in match config --- .../src/vespa/searchlib/attribute/configconverter.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'searchlib') diff --git a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp index 2e946c7d34b..ced5ccfdc85 100644 --- a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp +++ b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp @@ -63,9 +63,22 @@ convert(AttributesConfig::Attribute::Dictionary::Type type_cfg) { assert(false); } +DictionaryConfig::Match +convert(AttributesConfig::Attribute::Dictionary::Match match_cfg) { + switch (match_cfg) { + case AttributesConfig::Attribute::Dictionary::Match::CASE_SENSITIVE: + case AttributesConfig::Attribute::Dictionary::Match::CASED: + return DictionaryConfig::Match::CASED; + case AttributesConfig::Attribute::Dictionary::Match::CASE_INSENSITIVE: + case AttributesConfig::Attribute::Dictionary::Match::UNCASED: + return DictionaryConfig::Match::UNCASED; + } + assert(false); +} + DictionaryConfig convert_dictionary(const AttributesConfig::Attribute::Dictionary & dictionary) { - return DictionaryConfig(convert(dictionary.type)); + return DictionaryConfig(convert(dictionary.type), convert(dictionary.match)); } } -- cgit v1.2.3