summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/processing
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-03-24 10:26:46 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2021-03-24 10:26:46 +0100
commitff7f14ba4cafa7727d6246dca17bce35a32b91e5 (patch)
tree541821341a36ab7a281366905a4731ccf620f68e /config-model/src/test/java/com/yahoo/searchdefinition/processing
parent047a15e3b1c4afcb352713f3948b78f2f3a646cf (diff)
Also allow hash dictionary for multivalue numeric fields.
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/processing')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java
index 256858b372e..ba51caca0f7 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/DictionaryTestCase.java
@@ -50,12 +50,13 @@ public class DictionaryTestCase {
void verifyNumericDictionaryControl(Dictionary.Type expected,
AttributesConfig.Attribute.Dictionary.Type.Enum expectedConfig,
+ String type,
String ... cfg) throws ParseException
{
String def = TestUtil.joinLines(
"search test {",
" document test {",
- " field n1 type int {",
+ " field n1 type " + type + " {",
" indexing: summary | attribute",
" attribute:fast-search",
TestUtil.joinLines(cfg),
@@ -72,18 +73,35 @@ public class DictionaryTestCase {
public void testNumericBtreeSettings() throws ParseException {
verifyNumericDictionaryControl(Dictionary.Type.BTREE,
AttributesConfig.Attribute.Dictionary.Type.BTREE,
+ "int",
"dictionary:btree");
}
@Test
public void testNumericHashSettings() throws ParseException {
verifyNumericDictionaryControl(Dictionary.Type.HASH,
AttributesConfig.Attribute.Dictionary.Type.HASH,
+ "int",
"dictionary:hash");
}
@Test
public void testNumericBtreeAndHashSettings() throws ParseException {
verifyNumericDictionaryControl(Dictionary.Type.BTREE_AND_HASH,
AttributesConfig.Attribute.Dictionary.Type.BTREE_AND_HASH,
+ "int",
+ "dictionary:btree", "dictionary:hash");
+ }
+ @Test
+ public void testNumericArrayBtreeAndHashSettings() throws ParseException {
+ verifyNumericDictionaryControl(Dictionary.Type.BTREE_AND_HASH,
+ AttributesConfig.Attribute.Dictionary.Type.BTREE_AND_HASH,
+ "array<int>",
+ "dictionary:btree", "dictionary:hash");
+ }
+ @Test
+ public void testNumericWSetBtreeAndHashSettings() throws ParseException {
+ verifyNumericDictionaryControl(Dictionary.Type.BTREE_AND_HASH,
+ AttributesConfig.Attribute.Dictionary.Type.BTREE_AND_HASH,
+ "weightedset<int>",
"dictionary:btree", "dictionary:hash");
}
@Test