diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-04-12 23:26:33 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-04-12 23:26:33 +0200 |
commit | e4be90ee2b73903192ae6e716d507d4dfec28efc (patch) | |
tree | 4526d85c734403d9c754dc55d02d90c04bbcdb98 /config-model | |
parent | 123193fb0991fc6a9d2c5904d44dee256ad87745 (diff) |
Maps and arrays of structs has false doesAttributing so getAttribute() must be considered too.
Diffstat (limited to 'config-model')
6 files changed, 29 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java index 084500b61e3..f30e2367117 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java @@ -196,7 +196,9 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { private static boolean needLowerCase(ImmutableSDField field) { return field.doesIndexing() || field.doesLowerCasing() - || (field.doesAttributing() && isAnyChildString(field.getDataType()) && field.getMatching().getCase().equals(Case.UNCASED)); + || ((field.doesAttributing() || (field.getAttribute() != null)) + && isAnyChildString(field.getDataType()) + && field.getMatching().getCase().equals(Case.UNCASED)); } static String stemCmd(ImmutableSDField field, Search search) { diff --git a/config-model/src/test/derived/array_of_struct_attribute/index-info.cfg b/config-model/src/test/derived/array_of_struct_attribute/index-info.cfg index de7b744a95b..28026b8a683 100644 --- a/config-model/src/test/derived/array_of_struct_attribute/index-info.cfg +++ b/config-model/src/test/derived/array_of_struct_attribute/index-info.cfg @@ -6,6 +6,8 @@ indexinfo[].command[].command "word" indexinfo[].command[].indexname "elem_array.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "elem_array.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "elem_array.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "elem_array.name" indexinfo[].command[].command "fast-search" diff --git a/config-model/src/test/derived/exactmatch/index-info.cfg b/config-model/src/test/derived/exactmatch/index-info.cfg index cdf38849a24..f5d928a8fd0 100644 --- a/config-model/src/test/derived/exactmatch/index-info.cfg +++ b/config-model/src/test/derived/exactmatch/index-info.cfg @@ -22,6 +22,8 @@ indexinfo[].command[].command "exact *!!!*" indexinfo[].command[].indexname "string_map.key" indexinfo[].command[].command "index" indexinfo[].command[].indexname "string_map.key" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "string_map.key" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "string_map.key" indexinfo[].command[].command "type string" @@ -44,6 +46,8 @@ indexinfo[].command[].command "type string" indexinfo[].command[].indexname "elem_map.value.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "elem_map.value.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "elem_map.value.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "elem_map.value.name" indexinfo[].command[].command "type string" @@ -68,6 +72,8 @@ indexinfo[].command[].command "type Map<string,elem>" indexinfo[].command[].indexname "elem_array.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "elem_array.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "elem_array.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "elem_array.name" indexinfo[].command[].command "type string" diff --git a/config-model/src/test/derived/imported_struct_fields/index-info.cfg b/config-model/src/test/derived/imported_struct_fields/index-info.cfg index a4cef79f861..71ab3502f59 100644 --- a/config-model/src/test/derived/imported_struct_fields/index-info.cfg +++ b/config-model/src/test/derived/imported_struct_fields/index-info.cfg @@ -18,6 +18,8 @@ indexinfo[].command[].command "type string" indexinfo[].command[].indexname "my_elem_array.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "my_elem_array.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "my_elem_array.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "my_elem_array.name" indexinfo[].command[].command "fast-search" @@ -42,6 +44,8 @@ indexinfo[].command[].command "type Array<elem>" indexinfo[].command[].indexname "my_elem_map.value.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "my_elem_map.value.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "my_elem_map.value.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "my_elem_map.value.name" indexinfo[].command[].command "fast-search" @@ -64,6 +68,8 @@ indexinfo[].command[].command "type elem" indexinfo[].command[].indexname "my_elem_map.key" indexinfo[].command[].command "index" indexinfo[].command[].indexname "my_elem_map.key" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "my_elem_map.key" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "my_elem_map.key" indexinfo[].command[].command "fast-search" @@ -80,6 +86,8 @@ indexinfo[].command[].command "type Map<string,elem>" indexinfo[].command[].indexname "my_str_int_map.key" indexinfo[].command[].command "index" indexinfo[].command[].indexname "my_str_int_map.key" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "my_str_int_map.key" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "my_str_int_map.key" indexinfo[].command[].command "fast-search" diff --git a/config-model/src/test/derived/map_attribute/index-info.cfg b/config-model/src/test/derived/map_attribute/index-info.cfg index 51ab1f07a43..07e0482f436 100644 --- a/config-model/src/test/derived/map_attribute/index-info.cfg +++ b/config-model/src/test/derived/map_attribute/index-info.cfg @@ -6,6 +6,8 @@ indexinfo[].command[].command "word" indexinfo[].command[].indexname "str_map.key" indexinfo[].command[].command "index" indexinfo[].command[].indexname "str_map.key" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "str_map.key" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "str_map.key" indexinfo[].command[].command "fast-search" @@ -16,6 +18,8 @@ indexinfo[].command[].command "word" indexinfo[].command[].indexname "str_map.value" indexinfo[].command[].command "index" indexinfo[].command[].indexname "str_map.value" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "str_map.value" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "str_map.value" indexinfo[].command[].command "type string" diff --git a/config-model/src/test/derived/map_of_struct_attribute/index-info.cfg b/config-model/src/test/derived/map_of_struct_attribute/index-info.cfg index 606012c17e2..cee154645da 100644 --- a/config-model/src/test/derived/map_of_struct_attribute/index-info.cfg +++ b/config-model/src/test/derived/map_of_struct_attribute/index-info.cfg @@ -6,6 +6,8 @@ indexinfo[].command[].command "word" indexinfo[].command[].indexname "str_elem_map.key" indexinfo[].command[].command "index" indexinfo[].command[].indexname "str_elem_map.key" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "str_elem_map.key" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "str_elem_map.key" indexinfo[].command[].command "fast-search" @@ -16,6 +18,8 @@ indexinfo[].command[].command "word" indexinfo[].command[].indexname "str_elem_map.value.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "str_elem_map.value.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "str_elem_map.value.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "str_elem_map.value.name" indexinfo[].command[].command "type string" @@ -50,6 +54,8 @@ indexinfo[].command[].command "type int" indexinfo[].command[].indexname "int_elem_map.value.name" indexinfo[].command[].command "index" indexinfo[].command[].indexname "int_elem_map.value.name" +indexinfo[].command[].command "lowercase" +indexinfo[].command[].indexname "int_elem_map.value.name" indexinfo[].command[].command "attribute" indexinfo[].command[].indexname "int_elem_map.value.name" indexinfo[].command[].command "fast-search" |