summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-08-03 11:00:25 +0000
committerArne Juul <arnej@verizonmedia.com>2021-08-03 11:00:25 +0000
commita9d15347a8a62f2e19d0b39080bcda1b059edb78 (patch)
treea0f80d6ceabb07e7d8ed5baa47c42856ad96f6a0 /config-model
parentb4015464a0263f046778a4246645e618a402412a (diff)
unit test with ngram also
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java
index 18856e0731b..f0eaca4bafa 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java
@@ -202,4 +202,24 @@ public class IndexingScriptChangeValidatorTest {
new Fixture(entireSd).assertValidation();
}
+ @Test
+ public void requireThatNgramIsOk() throws Exception {
+ String entireSd = joinLines(
+ "search test {",
+ " document test {",
+ " field inside type string {",
+ " indexing: index",
+ " match {",
+ " gram",
+ " gram-size: 3",
+ " }",
+ " }",
+ " }",
+ " field outside type string {",
+ " indexing: input inside | ngram 2 | index outside",
+ " }",
+ "}");
+ new Fixture(entireSd).assertValidation();
+ }
+
}