Skip to content

Commit

Permalink
Merge pull request #29063 from vespa-engine/toregge/remove-unneded-do…
Browse files Browse the repository at this point in the history
…cument-summary-types

Remove unneeded document summary types.
  • Loading branch information
Tor Egge authored Oct 23, 2023
2 parents 1824435 + 65e572f commit cb5d179
Show file tree
Hide file tree
Showing 21 changed files with 75 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ schema test {
}
}
document-summary rename {
summary new_elem_array type array<elem> { source: elem_array }
summary new_elem_array { source: elem_array }
}
}
8 changes: 4 additions & 4 deletions config-model/src/test/derived/bolding_dynamic_summary/test.sd
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
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<string> {
summary arr_4_bold {
source: arr_4
bolding: on
}
Expand Down
4 changes: 2 additions & 2 deletions config-model/src/test/derived/map_of_struct_attribute/test.sd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ schema test {
}
}
document-summary rename {
summary new_str_elem_map type map<string,elem> { source: str_elem_map }
summary new_int_elem_map type map<int,elem> { source: int_elem_map }
summary new_str_elem_map { source: str_elem_map }
summary new_int_elem_map { source: int_elem_map }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,94 +80,94 @@ 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<int> {
summary g {
}

summary h type weightedset<string> {
summary h {
}

}

document-summary attributesonly1 {

summary a type string {
summary a {
}

summary c type string {
summary c {
}

}

# 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 {
}

}

# 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<string> {
summary alltags {
source: mytags
}
summary sometags type array<string> {
summary sometags {
source: mytags
matched-elements-only
}
summary anothera type string {
summary anothera {
source: a
}
summary anotherb type string {
summary anotherb {
source: b
}
}

# 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 {
Expand All @@ -178,10 +178,10 @@ schema multiplesummaries {

document-summary attributesonly3 {

summary a type string {
summary a {
}

summary anotbolded type string {
summary anotbolded {
source: a
}

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config-model/src/test/derived/nearestneighbor/test.sd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ schema test {
}
}
document-summary minimal {
summary id type int {}
summary id {}
}
}
2 changes: 1 addition & 1 deletion config-model/src/test/derived/ngram/chunk.sd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ schema chunk {
}

document-summary content-summary inherits default {
summary content_dynamic type string {
summary content_dynamic {
source: content
dynamic
}
Expand Down
2 changes: 1 addition & 1 deletion config-model/src/test/derived/reference_fields/ad.sd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ schema ad {
}
}
document-summary explicit_summary {
summary yet_another_ref type reference<campaign> {}
summary yet_another_ref {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
}
}
2 changes: 1 addition & 1 deletion config-model/src/test/derived/schemainheritance/child.sd
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
2 changes: 1 addition & 1 deletion config-model/src/test/derived/schemainheritance/parent.sd
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions config-model/src/test/examples/multiplesummaries.sd
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ search multiplesummaries {

document-summary other {

summary field1 type weightedset<string> {
summary field1 {
}

summary field2 type tag {
summary field2 {
}

summary field3 type array<int> {
summary field3 {
}

}
Expand Down
4 changes: 2 additions & 2 deletions config-model/src/test/examples/nextgen/summaryfield.sd
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ search summaryfield {
summary cox type string {
source: bar
}
summary alltags type array<string> {
summary alltags {
source: mytags
}
summary sometags type array<string> {
summary sometags {
source: mytags
matched-elements-only
}
Expand Down
6 changes: 3 additions & 3 deletions config-model/src/test/examples/outsidesummary.sd
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}

}
Expand Down
4 changes: 2 additions & 2 deletions config-model/src/test/examples/summaryfieldcollision.sd
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
10 changes: 5 additions & 5 deletions config-model/src/test/java/com/yahoo/schema/SchemaTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ void testSchemaInheritance() throws ParseException {
" 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" +
Expand Down Expand Up @@ -177,7 +177,7 @@ void testSchemaInheritance() throws ParseException {
" 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 {}" +
"}");
Expand Down Expand Up @@ -208,7 +208,7 @@ void testSchemaInheritance() throws ParseException {
" 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 {}" +
"}");
Expand Down Expand Up @@ -340,7 +340,7 @@ void testSchemaInheritanceEmptyChildren() throws ParseException {
" 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" +
Expand Down
Loading

0 comments on commit cb5d179

Please sign in to comment.