diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-11-03 19:12:21 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-11-03 19:12:21 +0100 |
commit | 6f919495278334c8d988180dbb222d59dc3321e6 (patch) | |
tree | 8bdfc7bccd552c3c6a7853576eda8333fcb530f8 /config-model/src | |
parent | a99d32f24eb23f77cd9a21800af9fc03b4715fde (diff) |
Stop adding and populating extra fields for dynamic summary.
They have not been used for a long time (summary field source
field is used instead).
Diffstat (limited to 'config-model/src')
11 files changed, 17 insertions, 44 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java b/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java index f6c78239fa1..2e9c23dbf06 100644 --- a/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java +++ b/config-model/src/main/java/com/yahoo/schema/processing/DynamicSummaryTransformUtils.java @@ -43,7 +43,7 @@ public class DynamicSummaryTransformUtils { * Whether a summary field must be populated by the source field with the given type in an indexing script. */ public static boolean summaryFieldIsPopulatedBySourceField(DataType sourceFieldType) { - return isOriginalSupportedType(sourceFieldType); + return false; } /** diff --git a/config-model/src/test/derived/bolding_dynamic_summary/documenttypes.cfg b/config-model/src/test/derived/bolding_dynamic_summary/documenttypes.cfg index 3e043d3dad8..6f0780b6dbe 100644 --- a/config-model/src/test/derived/bolding_dynamic_summary/documenttypes.cfg +++ b/config-model/src/test/derived/bolding_dynamic_summary/documenttypes.cfg @@ -94,11 +94,5 @@ doctype[].structtype[].field[].type 10019 doctype[].structtype[].field[].name "arr_4" doctype[].structtype[].field[].internalid 142340927 doctype[].structtype[].field[].type 10020 -doctype[].structtype[].field[].name "str_3_dyn" -doctype[].structtype[].field[].internalid 1779429789 -doctype[].structtype[].field[].type 10012 -doctype[].structtype[].field[].name "str_4_bold" -doctype[].structtype[].field[].internalid 1385662257 -doctype[].structtype[].field[].type 10012 doctype[].structtype[].internalid 306916075 diff --git a/config-model/src/test/derived/bolding_dynamic_summary/ilscripts.cfg b/config-model/src/test/derived/bolding_dynamic_summary/ilscripts.cfg index f9fdab87297..04251c1a270 100644 --- a/config-model/src/test/derived/bolding_dynamic_summary/ilscripts.cfg +++ b/config-model/src/test/derived/bolding_dynamic_summary/ilscripts.cfg @@ -11,8 +11,8 @@ ilscript[].docfield[] "arr_3" ilscript[].docfield[] "arr_4" ilscript[].content[] "clear_state | guard { input str_1 | tokenize normalize stem:\"BEST\" | index str_1 | summary str_1; }" ilscript[].content[] "clear_state | guard { input str_2 | tokenize normalize stem:\"BEST\" | index str_2 | summary str_2; }" -ilscript[].content[] "clear_state | guard { input str_3 | tokenize normalize stem:\"BEST\" | index str_3 | summary str_3 | summary str_3_dyn; }" -ilscript[].content[] "clear_state | guard { input str_4 | tokenize normalize stem:\"BEST\" | index str_4 | summary str_4 | summary str_4_bold; }" +ilscript[].content[] "clear_state | guard { input str_3 | tokenize normalize stem:\"BEST\" | index str_3 | summary str_3; }" +ilscript[].content[] "clear_state | guard { input str_4 | tokenize normalize stem:\"BEST\" | index str_4 | summary str_4; }" ilscript[].content[] "clear_state | guard { input arr_1 | for_each { tokenize normalize stem:\"BEST\" } | index arr_1 | summary arr_1; }" ilscript[].content[] "clear_state | guard { input arr_2 | for_each { tokenize normalize stem:\"BEST\" } | index arr_2 | summary arr_2; }" ilscript[].content[] "clear_state | guard { input arr_3 | for_each { tokenize normalize stem:\"BEST\" } | index arr_3 | summary arr_3; }" diff --git a/config-model/src/test/derived/multiplesummaries/ilscripts.cfg b/config-model/src/test/derived/multiplesummaries/ilscripts.cfg index 514dfffac9d..2f4ecdb1712 100644 --- a/config-model/src/test/derived/multiplesummaries/ilscripts.cfg +++ b/config-model/src/test/derived/multiplesummaries/ilscripts.cfg @@ -14,13 +14,13 @@ ilscript[].docfield[] "h" ilscript[].docfield[] "loc" ilscript[].docfield[] "mytags" ilscript[].content[] "clear_state | guard { input loc | to_pos | zcurve | attribute loc_pos_zcurve; }" -ilscript[].content[] "clear_state | guard { input a | summary abolded2 | summary aboldeddynamic | summary adynamic2 | summary a | attribute a; }" +ilscript[].content[] "clear_state | guard { input a | summary a | attribute a; }" ilscript[].content[] "clear_state | guard { input adynamic | summary adynamic | attribute adynamic; }" ilscript[].content[] "clear_state | guard { input abolded | summary abolded | attribute abolded; }" ilscript[].content[] "clear_state | guard { input b | summary anotherb | summary b; }" ilscript[].content[] "clear_state | guard { input c | summary c | attribute c; }" ilscript[].content[] "clear_state | guard { input d | summary d; }" -ilscript[].content[] "clear_state | guard { input e | summary dynamice | summary e; }" +ilscript[].content[] "clear_state | guard { input e | summary e; }" ilscript[].content[] "clear_state | guard { input f | summary f; }" ilscript[].content[] "clear_state | guard { input g | summary g; }" ilscript[].content[] "clear_state | guard { input h | summary h; }" diff --git a/config-model/src/test/derived/multiplesummaries/index-info.cfg b/config-model/src/test/derived/multiplesummaries/index-info.cfg index bd9635f0e60..38561c591ce 100644 --- a/config-model/src/test/derived/multiplesummaries/index-info.cfg +++ b/config-model/src/test/derived/multiplesummaries/index-info.cfg @@ -81,18 +81,6 @@ indexinfo[].command[].indexname "mytags" indexinfo[].command[].command "string" indexinfo[].command[].indexname "mytags" indexinfo[].command[].command "type Array<string>" -indexinfo[].command[].indexname "abolded2" -indexinfo[].command[].command "string" -indexinfo[].command[].indexname "abolded2" -indexinfo[].command[].command "type string" -indexinfo[].command[].indexname "aboldeddynamic" -indexinfo[].command[].command "string" -indexinfo[].command[].indexname "aboldeddynamic" -indexinfo[].command[].command "type string" -indexinfo[].command[].indexname "adynamic2" -indexinfo[].command[].command "string" -indexinfo[].command[].indexname "adynamic2" -indexinfo[].command[].command "type string" indexinfo[].command[].indexname "alltags" indexinfo[].command[].command "multivalue" indexinfo[].command[].indexname "alltags" @@ -103,10 +91,6 @@ indexinfo[].command[].indexname "anotherb" indexinfo[].command[].command "string" indexinfo[].command[].indexname "anotherb" indexinfo[].command[].command "type string" -indexinfo[].command[].indexname "dynamice" -indexinfo[].command[].command "string" -indexinfo[].command[].indexname "dynamice" -indexinfo[].command[].command "type string" indexinfo[].command[].indexname "loc_pos.x" indexinfo[].command[].command "numerical" indexinfo[].command[].indexname "loc_pos.x" diff --git a/config-model/src/test/derived/ngram/index-info.cfg b/config-model/src/test/derived/ngram/index-info.cfg index 72b6760ceb5..b54cb8af15c 100644 --- a/config-model/src/test/derived/ngram/index-info.cfg +++ b/config-model/src/test/derived/ngram/index-info.cfg @@ -12,10 +12,6 @@ indexinfo[].command[].command "type string" indexinfo[].command[].indexname "content" indexinfo[].command[].command "ngram 3" indexinfo[].command[].indexname "content_dynamic" -indexinfo[].command[].command "string" -indexinfo[].command[].indexname "content_dynamic" -indexinfo[].command[].command "type string" +indexinfo[].command[].command "dynteaser" indexinfo[].command[].indexname "content_dynamic" indexinfo[].command[].command "ngram 3" -indexinfo[].command[].indexname "content_dynamic" -indexinfo[].command[].command "dynteaser" diff --git a/config-model/src/test/derived/streamingstruct/documentmanager.cfg b/config-model/src/test/derived/streamingstruct/documentmanager.cfg index c29ff0b3489..f916cc26c36 100644 --- a/config-model/src/test/derived/streamingstruct/documentmanager.cfg +++ b/config-model/src/test/derived/streamingstruct/documentmanager.cfg @@ -143,12 +143,10 @@ doctype[].structtype[].field[].type 10017 doctype[].structtype[].field[].name "g" doctype[].structtype[].field[].internalid 1091070635 doctype[].structtype[].field[].type 10012 -doctype[].structtype[].field[].name "snippet" -doctype[].structtype[].field[].internalid 1102597618 -doctype[].structtype[].field[].type 10012 doctype[].structtype[].field[].name "snippet2" doctype[].structtype[].field[].internalid 1812076817 doctype[].structtype[].field[].type 10012 doctype[].structtype[].field[].name "anothersummaryfield" doctype[].structtype[].field[].internalid 1811005492 doctype[].structtype[].field[].type 10012 + diff --git a/config-model/src/test/java/com/yahoo/schema/SchemaImporterTestCase.java b/config-model/src/test/java/com/yahoo/schema/SchemaImporterTestCase.java index ab8738024b6..a11e743b4d2 100644 --- a/config-model/src/test/java/com/yahoo/schema/SchemaImporterTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/SchemaImporterTestCase.java @@ -40,7 +40,7 @@ public class SchemaImporterTestCase extends AbstractSchemaTestCase { SDDocumentType document = schema.getDocument(); assertEquals("simple", document.getName()); - assertEquals(23, document.getFieldCount()); + assertEquals(20, document.getFieldCount()); SDField field; Attribute attribute; diff --git a/config-model/src/test/java/com/yahoo/schema/processing/ImplicitSchemaFieldsTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/ImplicitSchemaFieldsTestCase.java index 3f031422524..ff7e43b2936 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/ImplicitSchemaFieldsTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/ImplicitSchemaFieldsTestCase.java @@ -13,6 +13,7 @@ import java.io.IOException; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase { @@ -51,10 +52,10 @@ public class ImplicitSchemaFieldsTestCase extends AbstractSchemaTestCase { SDDocumentType docType = schema.getDocument(); assertNotNull(docType); assertNotNull(docType.getField("foo")); - assertNotNull(docType.getField("bar")); + assertNull(docType.getField("bar")); assertNotNull(docType.getField("baz")); - assertNotNull(docType.getField("cox")); - assertEquals(4, docType.getFieldCount()); + assertNull(docType.getField("cox")); + assertEquals(2, docType.getFieldCount()); } @Test diff --git a/config-model/src/test/java/com/yahoo/schema/processing/IndexingOutputsTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/IndexingOutputsTestCase.java index 76680f4ce9a..f56d2b21a2d 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/IndexingOutputsTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/IndexingOutputsTestCase.java @@ -78,7 +78,7 @@ public class IndexingOutputsTestCase { """; var builder = ApplicationBuilder.createFromString(sd); var schema = builder.getSchema(); - assertEquals("{ input foo | summary baz | summary dyn_baz | summary bar; }", + assertEquals("{ input foo | summary baz | summary bar; }", schema.getConcreteField("bar").getIndexingScript().toString()); } } diff --git a/config-model/src/test/java/com/yahoo/schema/processing/IndexingScriptRewriterTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/IndexingScriptRewriterTestCase.java index 0b561563421..87e91acfb67 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/IndexingScriptRewriterTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/IndexingScriptRewriterTestCase.java @@ -48,7 +48,7 @@ public class IndexingScriptRewriterTestCase extends AbstractSchemaTestCase { void testDynamicSummaryRewriting() { SDField field = createField("test", DataType.STRING, "{ summary }"); field.addSummaryField(createDynamicSummaryField(field, "dyn")); - assertIndexingScript("{ input test | summary dyn | summary test; }", field); + assertIndexingScript("{ input test | summary test; }", field); } @Test @@ -64,7 +64,7 @@ public class IndexingScriptRewriterTestCase extends AbstractSchemaTestCase { field.addSummaryField(createStaticSummaryField(field, "test")); field.addSummaryField(createStaticSummaryField(field, "other")); field.addSummaryField(createDynamicSummaryField(field, "dyn2")); - assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | summary dyn | summary dyn2 | summary other | " + + assertIndexingScript("{ input test | tokenize normalize stem:\"BEST\" | summary other | " + "summary test | index test; }", field); } @@ -111,9 +111,9 @@ public class IndexingScriptRewriterTestCase extends AbstractSchemaTestCase { "clear_state | guard { input categories_src | lowercase | normalize | tokenize normalize stem:\"BEST\" | index categories; }", "clear_state | guard { input categoriesagain_src | lowercase | normalize | tokenize normalize stem:\"BEST\" | index categoriesagain; }", "clear_state | guard { input chatter | tokenize normalize stem:\"BEST\" | index chatter; }", - "clear_state | guard { input description | tokenize normalize stem:\"BEST\" | summary description | summary dyndesc | index description; }", + "clear_state | guard { input description | tokenize normalize stem:\"BEST\" | summary description | index description; }", "clear_state | guard { input exactemento_src | lowercase | tokenize normalize stem:\"BEST\" | index exactemento | summary exactemento; }", - "clear_state | guard { input longdesc | summary dyndesc2 | summary dynlong | summary longdesc | summary longstat; }", + "clear_state | guard { input longdesc | summary longdesc | summary longstat; }", "clear_state | guard { input measurement | attribute measurement | summary measurement; }", "clear_state | guard { input measurement | to_array | attribute measurement_arr; }", "clear_state | guard { input popularity | attribute popularity; }", |