summaryrefslogtreecommitdiffstats
path: root/config-model/src/test
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-11-13 10:39:57 +0100
committerJon Bratseth <bratseth@oath.com>2018-11-13 10:39:57 +0100
commit6c63867ffc456feee6510af2fed653b0e70d9419 (patch)
tree1ddb39bea496486e420de74c876eeeda20c5b66f /config-model/src/test
parent03c01d5476f9884b31328e8301e5e6e7bf7752ab (diff)
Consolidate match setting
Diffstat (limited to 'config-model/src/test')
-rw-r--r--config-model/src/test/derived/fieldset/index-info.cfg33
-rw-r--r--config-model/src/test/derived/fieldset/test.sd25
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/derived/FieldsetTestCase.java15
3 files changed, 73 insertions, 0 deletions
diff --git a/config-model/src/test/derived/fieldset/index-info.cfg b/config-model/src/test/derived/fieldset/index-info.cfg
new file mode 100644
index 00000000000..47dcbe58805
--- /dev/null
+++ b/config-model/src/test/derived/fieldset/index-info.cfg
@@ -0,0 +1,33 @@
+indexinfo[].name "test"
+indexinfo[].command[].indexname "sddocname"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "sddocname"
+indexinfo[].command[].command "word"
+indexinfo[].command[].indexname "word1"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "word1"
+indexinfo[].command[].command "lowercase"
+indexinfo[].command[].indexname "word1"
+indexinfo[].command[].command "multivalue"
+indexinfo[].command[].indexname "word1"
+indexinfo[].command[].command "word"
+indexinfo[].command[].indexname "word2"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "word2"
+indexinfo[].command[].command "lowercase"
+indexinfo[].command[].indexname "word2"
+indexinfo[].command[].command "multivalue"
+indexinfo[].command[].indexname "word2"
+indexinfo[].command[].command "word"
+indexinfo[].command[].indexname "rankfeatures"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "summaryfeatures"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "words"
+indexinfo[].command[].command "lowercase"
+indexinfo[].command[].indexname "words"
+indexinfo[].command[].command "multivalue"
+indexinfo[].command[].indexname "words"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "words"
+indexinfo[].command[].command "word"
diff --git a/config-model/src/test/derived/fieldset/test.sd b/config-model/src/test/derived/fieldset/test.sd
new file mode 100644
index 00000000000..c5ed169cc94
--- /dev/null
+++ b/config-model/src/test/derived/fieldset/test.sd
@@ -0,0 +1,25 @@
+search test {
+
+ document test {
+
+ field word1 type array<string> {
+ indexing: index | summary | attribute
+ match: word
+ stemming: none
+ normalizing: none
+ }
+
+ field word2 type array<string> {
+ indexing: index | summary | attribute
+ match: word
+ stemming: none
+ normalizing: none
+ }
+
+ }
+
+ fieldset words {
+ fields: word1,word2
+ }
+
+} \ No newline at end of file
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/derived/FieldsetTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/derived/FieldsetTestCase.java
new file mode 100644
index 00000000000..6b3a3cf6a24
--- /dev/null
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/derived/FieldsetTestCase.java
@@ -0,0 +1,15 @@
+package com.yahoo.searchdefinition.derived;
+
+import com.yahoo.searchdefinition.parser.ParseException;
+import org.junit.Test;
+
+import java.io.IOException;
+
+public class FieldsetTestCase extends AbstractExportingTestCase {
+
+ @Test
+ public void testRankProfiles() throws IOException, ParseException {
+ assertCorrectDeriving("fieldset");
+ }
+
+}