From 0c55dc92a3bf889c67fac1ca855e6e33e1994904 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Mon, 9 Oct 2023 09:44:29 +0200 Subject: Update copyright --- config-model/src/test/derived/ngram/chunk.sd | 1 + 1 file changed, 1 insertion(+) (limited to 'config-model/src/test/derived/ngram/chunk.sd') diff --git a/config-model/src/test/derived/ngram/chunk.sd b/config-model/src/test/derived/ngram/chunk.sd index 7c2a7465327..ab309f57548 100644 --- a/config-model/src/test/derived/ngram/chunk.sd +++ b/config-model/src/test/derived/ngram/chunk.sd @@ -1,3 +1,4 @@ +# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. schema chunk { document chunk { -- cgit v1.2.3 From 65e572f4507fe6324c07262f7302dd02d67ad175 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sun, 22 Oct 2023 13:43:10 +0200 Subject: Remove unneeded document summary types. --- .../test/derived/array_of_struct_attribute/test.sd | 2 +- .../test/derived/bolding_dynamic_summary/test.sd | 8 ++-- .../test/derived/map_of_struct_attribute/test.sd | 4 +- .../derived/multiplesummaries/multiplesummaries.sd | 50 +++++++++++----------- .../src/test/derived/nearestneighbor/test.sd | 2 +- config-model/src/test/derived/ngram/chunk.sd | 2 +- .../src/test/derived/reference_fields/ad.sd | 2 +- .../src/test/derived/reference_from_several/bar.sd | 2 +- .../src/test/derived/reference_from_several/foo.sd | 2 +- .../src/test/derived/schemainheritance/child.sd | 2 +- .../src/test/derived/schemainheritance/parent.sd | 2 +- .../src/test/examples/multiplesummaries.sd | 6 +-- .../src/test/examples/nextgen/summaryfield.sd | 4 +- config-model/src/test/examples/outsidesummary.sd | 6 +-- .../src/test/examples/summaryfieldcollision.sd | 4 +- .../test/java/com/yahoo/schema/SchemaTestCase.java | 10 ++--- .../java/com/yahoo/schema/SummaryTestCase.java | 28 ++++++------ .../com/yahoo/schema/derived/SummaryTestCase.java | 6 +-- .../MatchedElementsOnlyResolverTestCase.java | 4 +- .../processing/SummaryConsistencyTestCase.java | 2 +- .../SummaryDiskAccessValidatorTestCase.java | 2 +- 21 files changed, 75 insertions(+), 75 deletions(-) (limited to 'config-model/src/test/derived/ngram/chunk.sd') diff --git a/config-model/src/test/derived/array_of_struct_attribute/test.sd b/config-model/src/test/derived/array_of_struct_attribute/test.sd index ce6e3db7310..3e46aea986a 100644 --- a/config-model/src/test/derived/array_of_struct_attribute/test.sd +++ b/config-model/src/test/derived/array_of_struct_attribute/test.sd @@ -17,6 +17,6 @@ schema test { } } document-summary rename { - summary new_elem_array type array { source: elem_array } + summary new_elem_array { source: elem_array } } } diff --git a/config-model/src/test/derived/bolding_dynamic_summary/test.sd b/config-model/src/test/derived/bolding_dynamic_summary/test.sd index bf7455df3c9..3d054c65839 100644 --- a/config-model/src/test/derived/bolding_dynamic_summary/test.sd +++ b/config-model/src/test/derived/bolding_dynamic_summary/test.sd @@ -31,19 +31,19 @@ schema test { } } document-summary dyn { - summary str_3_dyn type string { + summary str_3_dyn { source: str_3 dynamic } - summary arr_3_dyn type array { + summary arr_3_dyn { source: arr_3 dynamic } - summary str_4_bold type string { + summary str_4_bold { source: str_4 bolding: on } - summary arr_4_bold type array { + summary arr_4_bold { source: arr_4 bolding: on } diff --git a/config-model/src/test/derived/map_of_struct_attribute/test.sd b/config-model/src/test/derived/map_of_struct_attribute/test.sd index 7001b95d09f..617f761c7e7 100644 --- a/config-model/src/test/derived/map_of_struct_attribute/test.sd +++ b/config-model/src/test/derived/map_of_struct_attribute/test.sd @@ -30,7 +30,7 @@ schema test { } } document-summary rename { - summary new_str_elem_map type map { source: str_elem_map } - summary new_int_elem_map type map { source: int_elem_map } + summary new_str_elem_map { source: str_elem_map } + summary new_int_elem_map { source: int_elem_map } } } diff --git a/config-model/src/test/derived/multiplesummaries/multiplesummaries.sd b/config-model/src/test/derived/multiplesummaries/multiplesummaries.sd index b19b04c8222..221e888adc7 100644 --- a/config-model/src/test/derived/multiplesummaries/multiplesummaries.sd +++ b/config-model/src/test/derived/multiplesummaries/multiplesummaries.sd @@ -80,35 +80,35 @@ schema multiplesummaries { document-summary third { - summary a type string { + summary a { } - summary adynamic type string { + summary adynamic { } - summary d type string { + summary d { } - summary e type string { + summary e { } summary f { } - summary g type array { + summary g { } - summary h type weightedset { + summary h { } } document-summary attributesonly1 { - summary a type string { + summary a { } - summary c type string { + summary c { } } @@ -116,10 +116,10 @@ schema multiplesummaries { # Since a here is a dynamic summary field, it will be fetched from disk document-summary notattributesonly1 { - summary adynamic type string { # Should still be dynamic here + summary adynamic { # Should still be dynamic here } - summary c type string { + summary c { } } @@ -127,25 +127,25 @@ schema multiplesummaries { # Since a here is a dynamic summary, it will be fetched from disk document-summary anothernotattributesonly2 { - summary adynamic2 type string { # Should still be dynamic here + summary adynamic2 { # Should still be dynamic here source: a dynamic } - summary c type string { + summary c { } - summary alltags type array { + summary alltags { source: mytags } - summary sometags type array { + summary sometags { source: mytags matched-elements-only } - summary anothera type string { + summary anothera { source: a } - summary anotherb type string { + summary anotherb { source: b } } @@ -153,21 +153,21 @@ schema multiplesummaries { # Not attributes only because d is bolded document-summary notattributesonly3 { - summary a type string { + summary a { } - summary d type string { + summary d { } } document-summary attributesonly2 { - summary anotdynamic type string { # Should not be dynamic here + summary anotdynamic { # Should not be dynamic here source: adynamic } - summary c type string { + summary c { } summary loc_position type long { @@ -178,10 +178,10 @@ schema multiplesummaries { document-summary attributesonly3 { - summary a type string { + summary a { } - summary anotbolded type string { + summary anotbolded { source: a } @@ -192,19 +192,19 @@ schema multiplesummaries { document-summary notattributesonly4 { - summary abolded2 type string { + summary abolded2 { source: a bolding: on } - summary c type string { + summary c { } } document-summary notattributesonly5 { - summary aboldeddynamic type string { + summary aboldeddynamic { source: a dynamic bolding: on diff --git a/config-model/src/test/derived/nearestneighbor/test.sd b/config-model/src/test/derived/nearestneighbor/test.sd index 7d08a5279bc..5b891049480 100644 --- a/config-model/src/test/derived/nearestneighbor/test.sd +++ b/config-model/src/test/derived/nearestneighbor/test.sd @@ -23,6 +23,6 @@ schema test { } } document-summary minimal { - summary id type int {} + summary id {} } } diff --git a/config-model/src/test/derived/ngram/chunk.sd b/config-model/src/test/derived/ngram/chunk.sd index ab309f57548..84d806ef074 100644 --- a/config-model/src/test/derived/ngram/chunk.sd +++ b/config-model/src/test/derived/ngram/chunk.sd @@ -12,7 +12,7 @@ schema chunk { } document-summary content-summary inherits default { - summary content_dynamic type string { + summary content_dynamic { source: content dynamic } diff --git a/config-model/src/test/derived/reference_fields/ad.sd b/config-model/src/test/derived/reference_fields/ad.sd index 390f8f6a154..097a6ed5bc9 100644 --- a/config-model/src/test/derived/reference_fields/ad.sd +++ b/config-model/src/test/derived/reference_fields/ad.sd @@ -12,6 +12,6 @@ schema ad { } } document-summary explicit_summary { - summary yet_another_ref type reference {} + summary yet_another_ref {} } } diff --git a/config-model/src/test/derived/reference_from_several/bar.sd b/config-model/src/test/derived/reference_from_several/bar.sd index 12cf8e63378..02c912153ef 100644 --- a/config-model/src/test/derived/reference_from_several/bar.sd +++ b/config-model/src/test/derived/reference_from_several/bar.sd @@ -10,7 +10,7 @@ schema bar { } import field bpref.x as barsximp {} document-summary other { - summary bartitle type string {} + summary bartitle {} summary barsximp type int {} } } diff --git a/config-model/src/test/derived/reference_from_several/foo.sd b/config-model/src/test/derived/reference_from_several/foo.sd index 5ef42ee6f0d..26ba07ea1fd 100644 --- a/config-model/src/test/derived/reference_from_several/foo.sd +++ b/config-model/src/test/derived/reference_from_several/foo.sd @@ -11,6 +11,6 @@ schema foo { import field myref.x as myx {} document-summary small { summary myx type int {} - summary foo type string {} + summary foo {} } } diff --git a/config-model/src/test/derived/schemainheritance/child.sd b/config-model/src/test/derived/schemainheritance/child.sd index 77daf2ba34f..ea3ff9b85da 100644 --- a/config-model/src/test/derived/schemainheritance/child.sd +++ b/config-model/src/test/derived/schemainheritance/child.sd @@ -36,7 +36,7 @@ schema child inherits parent { } document-summary child_summary inherits parent_summary { - summary cf1 type string {} + summary cf1 {} } import field importedschema_ref.importedfield2 as child_imported {} diff --git a/config-model/src/test/derived/schemainheritance/parent.sd b/config-model/src/test/derived/schemainheritance/parent.sd index 03392b428ed..ab2b703ba57 100644 --- a/config-model/src/test/derived/schemainheritance/parent.sd +++ b/config-model/src/test/derived/schemainheritance/parent.sd @@ -32,7 +32,7 @@ schema parent { file: small_constants_and_functions.onnx } document-summary parent_summary { - summary pf1 type string { + summary pf1 { } } import field importedschema_ref.importedfield1 as parent_imported { diff --git a/config-model/src/test/examples/multiplesummaries.sd b/config-model/src/test/examples/multiplesummaries.sd index 7e298b4e7a3..a7e3a78fe6d 100644 --- a/config-model/src/test/examples/multiplesummaries.sd +++ b/config-model/src/test/examples/multiplesummaries.sd @@ -19,13 +19,13 @@ search multiplesummaries { document-summary other { - summary field1 type weightedset { + summary field1 { } - summary field2 type tag { + summary field2 { } - summary field3 type array { + summary field3 { } } diff --git a/config-model/src/test/examples/nextgen/summaryfield.sd b/config-model/src/test/examples/nextgen/summaryfield.sd index 06cc980ea73..5a5747359a0 100644 --- a/config-model/src/test/examples/nextgen/summaryfield.sd +++ b/config-model/src/test/examples/nextgen/summaryfield.sd @@ -13,10 +13,10 @@ search summaryfield { summary cox type string { source: bar } - summary alltags type array { + summary alltags { source: mytags } - summary sometags type array { + summary sometags { source: mytags matched-elements-only } diff --git a/config-model/src/test/examples/outsidesummary.sd b/config-model/src/test/examples/outsidesummary.sd index 5fadc1948f0..a95cbb0c628 100644 --- a/config-model/src/test/examples/outsidesummary.sd +++ b/config-model/src/test/examples/outsidesummary.sd @@ -3,17 +3,17 @@ search outsidesummary { document-summary other { - summary sa type string { + summary sa { dynamic source: a } - summary sa2 type string { + summary sa2 { full source: a } - summary a type string { + summary a { } } diff --git a/config-model/src/test/examples/summaryfieldcollision.sd b/config-model/src/test/examples/summaryfieldcollision.sd index 6a8cb2eeb31..2235abce422 100644 --- a/config-model/src/test/examples/summaryfieldcollision.sd +++ b/config-model/src/test/examples/summaryfieldcollision.sd @@ -13,13 +13,13 @@ search summaryfieldcollision { } document-summary sum1 { - summary f type string { + summary f { source: title } } document-summary sum2 { - summary f type string { + summary f { source: description } } diff --git a/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java b/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java index 798252c9a34..c959634019d 100644 --- a/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java @@ -143,10 +143,10 @@ public class SchemaTestCase { " file: models/my_model.onnx" + " }" + " document-summary parent_summary1 {" + - " summary pf1 type string {}" + + " summary pf1 {}" + " }" + " document-summary parent_summary2 {" + - " summary pf2 type string {}" + + " summary pf2 {}" + " }" + " import field parentschema_ref.name as parent_imported {}" + " raw-as-base64-in-summary" + @@ -177,7 +177,7 @@ public class SchemaTestCase { " file: models/my_model.onnx" + " }" + " document-summary child1_summary inherits parent_summary1 {" + - " summary c1f1 type string {}" + + " summary c1f1 {}" + " }" + " import field parentschema_ref.name as child1_imported {}" + "}"); @@ -208,7 +208,7 @@ public class SchemaTestCase { " file: models/my_model.onnx" + " }" + " document-summary child2_summary inherits parent_summary1, parent_summary2 {" + - " summary c2f1 type string {}" + + " summary c2f1 {}" + " }" + " import field parentschema_ref.name as child2_imported {}" + "}"); @@ -340,7 +340,7 @@ public class SchemaTestCase { " file: models/my_model.onnx" + " }" + " document-summary parent_summary {" + - " summary pf1 type string {}" + + " summary pf1 {}" + " }" + " import field parentschema_ref.name as parent_imported {}" + " raw-as-base64-in-summary" + diff --git a/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java index c9fa3ce145a..3c83e79157a 100644 --- a/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/SummaryTestCase.java @@ -48,8 +48,8 @@ public class SummaryTestCase { String sd = joinLines( "schema disksummary {", " document-summary foobar {", - " summary foo1 type string { source: inmemory }", - " summary foo2 type string { source: ondisk }", + " summary foo1 { source: inmemory }", + " summary foo2 { source: ondisk }", " }", " document disksummary {", " field inmemory type string {", @@ -84,8 +84,8 @@ public class SummaryTestCase { " }", " }", " document-summary foobar {", - " summary foo1 type string { source: inmemory }", - " summary foo2 type string { source: ondisk }", + " summary foo1 { source: inmemory }", + " summary foo2 { source: ondisk }", " from-disk", " }", "}"); @@ -114,7 +114,7 @@ public class SummaryTestCase { " }", " }", " document-summary filtered {", - " summary elem_array_filtered type array {", + " summary elem_array_filtered {", " source: elem_array", " matched-elements-only", " }", @@ -141,17 +141,17 @@ public class SummaryTestCase { " }", " }", " document-summary title {", - " summary title type string {", + " summary title {", " source: title", " }", " }", " document-summary title_artist inherits title {", - " summary artist type string {", + " summary artist {", " source: artist", " }", " }", " document-summary everything inherits title_artist {", - " summary album type string {", + " summary album {", " source: album", " }", " }", @@ -201,12 +201,12 @@ public class SummaryTestCase { " }", " }", " document-summary title {", - " summary title type string {", + " summary title {", " source: title", " }", " }", " document-summary title2 inherits title {", - " summary title type string {", + " summary title {", " source: title_short", " }", " }", @@ -297,12 +297,12 @@ public class SummaryTestCase { } } document-summary parent1 { - summary s1 type string { + summary s1 { source: field1 } } document-summary parent2 { - summary field1 type string { + summary field1 { source: field1 } } @@ -326,7 +326,7 @@ public class SummaryTestCase { " }" + " }" + " document-summary parent_summary {" + - " summary pf1 type string {}" + + " summary pf1 {}" + " }" + "}"); String child = joinLines( @@ -337,7 +337,7 @@ public class SummaryTestCase { " }" + " }" + " document-summary child_summary inherits parent_summary {" + - " summary cf1 type string {}" + + " summary cf1 {}" + " }" + "}"); DeployLoggerStub logger = new DeployLoggerStub(); diff --git a/config-model/src/test/java/com/yahoo/schema/derived/SummaryTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/SummaryTestCase.java index a1d726473be..2fb7955546c 100644 --- a/config-model/src/test/java/com/yahoo/schema/derived/SummaryTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/derived/SummaryTestCase.java @@ -131,7 +131,7 @@ public class SummaryTestCase extends AbstractSchemaTestCase { " }", " }", " document-summary my_summary {", - " summary other_campaign_ref type reference {}", + " summary other_campaign_ref {}", " }", "}")); builder.build(true); @@ -146,11 +146,11 @@ public class SummaryTestCase extends AbstractSchemaTestCase { " field foo type string { indexing: summary }", " }", " document-summary bar {", - " summary foo type string {}", + " summary foo {}", " omit-summary-features", " }", " document-summary baz {", - " summary foo type string {}", + " summary foo {}", " }", "}"); var search = ApplicationBuilder.createFromString(sd).getSchema(); diff --git a/config-model/src/test/java/com/yahoo/schema/processing/MatchedElementsOnlyResolverTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/MatchedElementsOnlyResolverTestCase.java index e8f8ba4193f..91cd2418eef 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/MatchedElementsOnlyResolverTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/MatchedElementsOnlyResolverTestCase.java @@ -72,7 +72,7 @@ public class MatchedElementsOnlyResolverTestCase { @Test void explicit_complex_summary_field_can_use_filter_transform_with_reference_to_source_field() throws ParseException { String documentSummary = joinLines("document-summary my_summary {", - " summary my_filter_field type map {", + " summary my_filter_field {", " source: my_field", " matched-elements-only", " }", @@ -123,7 +123,7 @@ public class MatchedElementsOnlyResolverTestCase { @Test void explicit_summary_field_can_use_filter_transform_with_reference_to_attribute_source_field() throws ParseException { String documentSummary = joinLines("document-summary my_summary {", - " summary my_filter_field type array {", + " summary my_filter_field {", " source: my_field", " matched-elements-only", " }", diff --git a/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java index d2938371c5b..9eca2106c5e 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/SummaryConsistencyTestCase.java @@ -32,7 +32,7 @@ public class SummaryConsistencyTestCase { " }", " }", " document-summary unfiltered {", - " summary elem_array_unfiltered type array {", + " summary elem_array_unfiltered {", " source: elem_array", " }", " }", diff --git a/config-model/src/test/java/com/yahoo/schema/processing/SummaryDiskAccessValidatorTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/SummaryDiskAccessValidatorTestCase.java index ab376e539ec..a5145588136 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/SummaryDiskAccessValidatorTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/SummaryDiskAccessValidatorTestCase.java @@ -25,7 +25,7 @@ public class SummaryDiskAccessValidatorTestCase { " }", " }", " document-summary my_sum {", - " summary str_map type map { source: str_map }", + " summary str_map { source: str_map }", " }", "}"); -- cgit v1.2.3