diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-09-13 15:35:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-13 15:35:57 +0200 |
commit | 565b814775cfe84dcf201a10df24170963e1e1c2 (patch) | |
tree | 1e3faa11f07f3191711014e9ab6a4c31aba8dea7 /config-model/src/test/java/com | |
parent | 57dc0c8318cc1c3ce2962e19f882150c146fd200 (diff) | |
parent | 65ecb02c12d3f87ee3839bdddd14ce969a40d7ce (diff) |
Merge pull request #24031 from vespa-engine/geirst/allow-dynamic-transform-array-string
Allow dynamic transforms on array<string> summary fields.
Diffstat (limited to 'config-model/src/test/java/com')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/derived/ExportingTestCase.java | 5 | ||||
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/processing/BoldingTestCase.java | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/derived/ExportingTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/ExportingTestCase.java index b5b075ae260..c1e65abb5a5 100644 --- a/config-model/src/test/java/com/yahoo/schema/derived/ExportingTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/derived/ExportingTestCase.java @@ -192,4 +192,9 @@ public class ExportingTestCase extends AbstractExportingTestCase { assertCorrectDeriving("structandfieldset"); } + @Test + void testBoldingAndDynamicSummary() throws IOException, ParseException { + assertCorrectDeriving("bolding_dynamic_summary"); + } + } diff --git a/config-model/src/test/java/com/yahoo/schema/processing/BoldingTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/BoldingTestCase.java index fe38ea1f1b1..7162cf7717b 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/BoldingTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/BoldingTestCase.java @@ -39,10 +39,10 @@ public class BoldingTestCase extends AbstractSchemaTestCase { } } - private final String boldonarray = - "search boldonarray {\n" + - " document boldonarray {\n" + - " field myarray type array<string> {\n" + + private final String boldonwset = + "search test {\n" + + " document test {\n" + + " field mywset type weightedset<string> {\n" + " indexing: summary | index\n" + " bolding: on\n" + " }\n" + @@ -50,12 +50,12 @@ public class BoldingTestCase extends AbstractSchemaTestCase { "}\n"; @Test - void testBoldOnArray() throws ParseException { + void testBoldOnWsetThrowsException() throws ParseException { try { - ApplicationBuilder.createFromString(boldonarray); + ApplicationBuilder.createFromString(boldonwset); fail("Expected exception"); } catch (IllegalArgumentException e) { - assertEquals("'bolding: on' for non-text field 'myarray' (datatype Array<string> (code: -1486737430)) is not allowed", + assertEquals("'bolding: on' for non-text field 'mywset' (datatype WeightedSet<string> (code: 1328286588)) is not allowed", e.getMessage()); } } |