From f0ef2649b28e545c2df00dfbab2990753fece87d Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Thu, 3 Jun 2021 11:31:05 +0200 Subject: Revert "Move test data" This reverts commit aab0425ec1b2d683708781f9247c4b164b04739d. --- vespa-documentgen-plugin/etc/complex/book.sd | 88 +++++++++++++++++++++ vespa-documentgen-plugin/etc/complex/common.sd | 40 ++++++++++ vespa-documentgen-plugin/etc/complex/common2.sd | 9 +++ vespa-documentgen-plugin/etc/complex/music2.sd | 74 ++++++++++++++++++ vespa-documentgen-plugin/etc/complex/music3.sd | 11 +++ .../etc/complex/sombrerowebdoc.sd.FOO | 73 ++++++++++++++++++ vespa-documentgen-plugin/etc/complex/video.sd | 49 ++++++++++++ vespa-documentgen-plugin/etc/localapp/book.sd | 89 ++++++++++++++++++++++ vespa-documentgen-plugin/etc/localapp/common.sd | 45 +++++++++++ vespa-documentgen-plugin/etc/localapp/music.sd | 70 +++++++++++++++++ vespa-documentgen-plugin/etc/localapp/video.sd | 54 +++++++++++++ vespa-documentgen-plugin/etc/music/music.sd | 53 +++++++++++++ .../test/java/com/yahoo/vespa/DocumentGenTest.java | 15 ++-- .../src/test/resources/schemas/complex/book.sd | 88 --------------------- .../src/test/resources/schemas/complex/common.sd | 40 ---------- .../src/test/resources/schemas/complex/common2.sd | 9 --- .../src/test/resources/schemas/complex/music2.sd | 74 ------------------ .../src/test/resources/schemas/complex/music3.sd | 11 --- .../schemas/complex/sombrerowebdoc.sd.FOO | 73 ------------------ .../src/test/resources/schemas/complex/video.sd | 49 ------------ .../src/test/resources/schemas/localapp/book.sd | 89 ---------------------- .../src/test/resources/schemas/localapp/common.sd | 45 ----------- .../src/test/resources/schemas/localapp/music.sd | 70 ----------------- .../src/test/resources/schemas/localapp/video.sd | 54 ------------- .../src/test/resources/schemas/music/music.sd | 53 ------------- 25 files changed, 661 insertions(+), 664 deletions(-) create mode 100644 vespa-documentgen-plugin/etc/complex/book.sd create mode 100644 vespa-documentgen-plugin/etc/complex/common.sd create mode 100644 vespa-documentgen-plugin/etc/complex/common2.sd create mode 100644 vespa-documentgen-plugin/etc/complex/music2.sd create mode 100644 vespa-documentgen-plugin/etc/complex/music3.sd create mode 100644 vespa-documentgen-plugin/etc/complex/sombrerowebdoc.sd.FOO create mode 100644 vespa-documentgen-plugin/etc/complex/video.sd create mode 100644 vespa-documentgen-plugin/etc/localapp/book.sd create mode 100644 vespa-documentgen-plugin/etc/localapp/common.sd create mode 100644 vespa-documentgen-plugin/etc/localapp/music.sd create mode 100644 vespa-documentgen-plugin/etc/localapp/video.sd create mode 100644 vespa-documentgen-plugin/etc/music/music.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/book.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/common.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/common2.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/music2.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/music3.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/sombrerowebdoc.sd.FOO delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/complex/video.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/localapp/book.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/localapp/common.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/localapp/music.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/localapp/video.sd delete mode 100644 vespa-documentgen-plugin/src/test/resources/schemas/music/music.sd diff --git a/vespa-documentgen-plugin/etc/complex/book.sd b/vespa-documentgen-plugin/etc/complex/book.sd new file mode 100644 index 00000000000..6d6145cb10b --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/book.sd @@ -0,0 +1,88 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search book { + document book inherits common { + struct ss0 { + field s0 type string{} + field d0 type double{} + } + struct ss1 { + field s1 type string { } + field l1 type long { } + field i1 type int { } + field d1 type double { } + field as1 type array { } + field al1 type array { } + field ss01 type ss0 {} + } + + struct ss2 { + field s21 type string {} + field ss02 type ss0 {} + } + + field mystruct type ss1 { + } + + field mystruct2 type ss2 {} + + field mywsfloat type weightedset { + indexing: attribute + } + + field mynestedwsfloat type weightedset {} + + field myarrayint type array { + indexing: attribute + } + + field stringmap type map { + } + + field structmap type map { + } + + field mysinglestructarray type array {} + + #field mydoublestructarray type array> {} + + field author type string { + bolding: on + # index-to: default, author + indexing: summary | index + } + field isbn type string { + # index-to: default, isbn + indexing: summary | index + } + field year type int { + indexing: summary | index + } + field description type string { + # index-to: default, description + indexing: summary | index + summary: dynamic + } + } + + field sw1 type float { + indexing { + input weight * 6 + input w1 + input w2 | summary; + } + } + + field didinteger type array { + indexing: input did | split " " | for_each { to_int } | attribute + } + + rank-profile default { + first-phase { + expression: nativeRank + } + } + rank-profile rp1 inherits default { + #static-rank: weight1 + } + rank-profile rp2 inherits default { + #static-rank: weight2 + } +} diff --git a/vespa-documentgen-plugin/etc/complex/common.sd b/vespa-documentgen-plugin/etc/complex/common.sd new file mode 100644 index 00000000000..e0505eba05b --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/common.sd @@ -0,0 +1,40 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search common { + document common { + field uri type string { + indexing: summary + } + field title type string { + bolding: on + # index-to: default, title + indexing: index|summary + summary-to: smallsum + } + field mid type int { + indexing: attribute|index|summary + } + field scorekey type string { + indexing: summary + } + field weight type float { + indexing: attribute | summary + } + field w1 type float { + indexing: summary + } + field w2 type float { + indexing: summary + } + field did type string { + indexing: attribute|index|summary + } + field ew type string { + indexing: index|summary + } + } + rank-profile default { + first-phase { + expression: nativeRank + } + } +} diff --git a/vespa-documentgen-plugin/etc/complex/common2.sd b/vespa-documentgen-plugin/etc/complex/common2.sd new file mode 100644 index 00000000000..e32d3ed6751 --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/common2.sd @@ -0,0 +1,9 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search common2 { + document { + field com2 type string { + + } + } +} + diff --git a/vespa-documentgen-plugin/etc/complex/music2.sd b/vespa-documentgen-plugin/etc/complex/music2.sd new file mode 100644 index 00000000000..2e2d96ecdec --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/music2.sd @@ -0,0 +1,74 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search music2 { + document music2 inherits common { + field artist type string { + bolding: on + # index-to: default, artist + indexing: index|summary + } + field disp_song type string { + indexing: summary + } + field song type string { + # index-to: default, song + indexing: index + } + field isbn type string { + bolding: on + # index-to: default, isbn + indexing: index|summary + } + field year type int { + indexing: attribute|index|summary + } + annotation recordlabel {} + + annotation person { + field name type string { } + } + + annotation artist inherits person { + field instrument type int { } + } + + annotation date { + field exacttime type long { } + } + + annotation place { + field lat type long { } + field lon type long { } + } + + annotation event { + field description type string { } + field person type annotationreference { } + field date type annotationreference { } + field place type annotationreference { } + } + + } + + field sw1 type float { + indexing { + input weight * 6 + input w1 + input w2 | summary; + } + } + + field didinteger type array { + indexing: input did | split " " | for_each { to_int } | attribute + } + + rank-profile default { + first-phase { + expression: nativeRank + } + } + rank-profile rp1 inherits default { + #static-rank: weight1 + } + rank-profile rp2 inherits default { + #static-rank: weight2 + } + +} diff --git a/vespa-documentgen-plugin/etc/complex/music3.sd b/vespa-documentgen-plugin/etc/complex/music3.sd new file mode 100644 index 00000000000..8bd612268df --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/music3.sd @@ -0,0 +1,11 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search music3 { + document music3 inherits music2, common2 { + field mu3 type string { + + } + field pos type position { + indexing: attribute + } + } +} diff --git a/vespa-documentgen-plugin/etc/complex/sombrerowebdoc.sd.FOO b/vespa-documentgen-plugin/etc/complex/sombrerowebdoc.sd.FOO new file mode 100644 index 00000000000..1524e7480a0 --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/sombrerowebdoc.sd.FOO @@ -0,0 +1,73 @@ +search sombrerowebdoc { + + document sombrerowebdoc { + version : 0 + + struct sombreroattribute { + field attributetype type int {} + field intvalue type int {} + field huffmanindex type int {} + field lexicon type string {} + field name type string {} + field strvalue type string {} + } + + annotation sombreroTOKEN { } + + annotation sombreroPHRASE { + field prefixused type int {} + field suffixused type int {} + field attributes type array {} + field annotationreferences type array> {} + } + + struct sombrerocontentfilter { + field id type string {} + field value type string {} + } + + struct sombrerorule { + field name type string {} + field location type string {} + field contentfilters type array {} + } + + struct sombrerometrics { + field executiontime type double {} + } + + struct sombreroextraction { + field adjuncts type string {} + field metrics type sombrerometrics {} + field status type string {} + } + + + field url type string {} + + field raw_html type string {} + + field decoded_html type string {} + + field rules type array {} + + field extraction type sombreroextraction {} + + field content_language type string {} + + field dupdetectshinglesketch type string {} + + field mlprisma type string {} + + field raw_bytes type raw {} + + field charset_encoding type string {} + + field meta_language type string {} + + field language type string {} + + field region type string {} + + } +} diff --git a/vespa-documentgen-plugin/etc/complex/video.sd b/vespa-documentgen-plugin/etc/complex/video.sd new file mode 100644 index 00000000000..0b0298a162c --- /dev/null +++ b/vespa-documentgen-plugin/etc/complex/video.sd @@ -0,0 +1,49 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search video { + document video inherits common { + field director type string { + bolding: on + indexing: index|summary + } + field disp_actor type string { + bolding: on + indexing: index|summary + } + field actor type string { + bolding: on + indexing: index|summary + } + field fmt type string { + indexing: index|summary + } + field isbn type string { + bolding: on + indexing: index|summary + } + field year type int { + indexing: attribute|index|summary + } + } + + field sw1 type float { + indexing { + input weight * 6 + input w1 + input w2 | summary; + } + } + + field didinteger type array { + indexing: input did | split " " | for_each { to_int } | attribute + } + + rank-profile default { + first-phase { + expression: file:non-existing.expression + } + } + rank-profile rp1 inherits default { + #static-rank: weight1 + } + rank-profile rp2 inherits default { + #static-rank: weight2 + } +} diff --git a/vespa-documentgen-plugin/etc/localapp/book.sd b/vespa-documentgen-plugin/etc/localapp/book.sd new file mode 100644 index 00000000000..72faa934aa6 --- /dev/null +++ b/vespa-documentgen-plugin/etc/localapp/book.sd @@ -0,0 +1,89 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search book { + document book inherits common { + struct ss0 { + field s0 type string{} + field d0 type double{} + } + struct ss1 { + field s1 type string { } + field l1 type long { } + field i1 type int { } + field d1 type double { } + field as1 type array { } + field al1 type array { } + field ss01 type ss0 {} + } + + struct ss2 { + field s21 type string {} + field ss02 type ss0 {} + } + + field mystruct type ss1 { + } + + field mystruct2 type ss2 {} + + field mywsfloat type weightedset { + indexing: attribute + } + + field myarrayint type array { + indexing: attribute + } + + field mytriplearray type array>> {} + + field stringmap type map { + } + + field structmap type map { + } + + field mysinglestructarray type array {} + #field mydoublestructarray type array> {} + + field author type string { + bolding: on + # index-to: default, author + indexing: summary | index + } + field isbn type string { + # index-to: default, isbn + indexing: summary | index + } + field year type int { + indexing: summary | index + } + field description type string { + # index-to: default, description + indexing: summary | index + summary: dynamic + } + + field myraw type raw {} + } + + field sw1 type float { + indexing { + input weight * 6 + input w1 + input w2 | summary; + } + } + + field didinteger type array { + indexing: input did | split " " | for_each { to_int } | attribute + } + + rank-profile default { + first-phase { + expression: nativeRank + } + } + rank-profile rp1 inherits default { + #static-rank: weight1 + } + rank-profile rp2 inherits default { + #static-rank: weight2 + } +} diff --git a/vespa-documentgen-plugin/etc/localapp/common.sd b/vespa-documentgen-plugin/etc/localapp/common.sd new file mode 100644 index 00000000000..724897b4e7f --- /dev/null +++ b/vespa-documentgen-plugin/etc/localapp/common.sd @@ -0,0 +1,45 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search common { + document common { + field uri type string { + indexing: summary + } + field title type string { + bolding: on + # index-to: default, title + indexing: index|summary + summary-to: smallsum + } + field mid type int { + indexing: attribute|index|summary + } + field scorekey type string { + indexing: summary + } + field weight type float { + indexing: attribute|summary + } + field w1 type float { + indexing: summary + } + field w2 type float { + indexing: summary + } + field did type string { + indexing: attribute|index|summary + } + field ew type string { + indexing: index|summary + } + annotation date { + field exacttime type long { } + } + + annotation emptyannotation {} + } + rank-profile default { + first-phase { + expression: nativeRank + } + } +} diff --git a/vespa-documentgen-plugin/etc/localapp/music.sd b/vespa-documentgen-plugin/etc/localapp/music.sd new file mode 100644 index 00000000000..e00e046f511 --- /dev/null +++ b/vespa-documentgen-plugin/etc/localapp/music.sd @@ -0,0 +1,70 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search music { + document music inherits common { + field artist type string { + bolding: on + # index-to: default, artist + indexing: index|summary + } + field disp_song type string { + indexing: summary + } + field song type string { + # index-to: default, song + indexing: index + } + field isbn type string { + bolding: on + # index-to: default, isbn + indexing: index|summary + } + field year type int { + indexing: attribute|index|summary + } + annotation recordlabel {} + + annotation person { + field name type string { } + } + + annotation artist inherits person { + field instrument type int { } + } + + annotation place { + field lat type long { } + field lon type long { } + } + + annotation event { + field description type string { } + field person type annotationreference { } + field date type annotationreference { } + field place type annotationreference { } + } + } + + field sw1 type float { + indexing { + input weight * 6 + input w1 + input w2 | summary; + } + } + + field didinteger type array { + indexing: input did | split " " | for_each { to_int } | attribute + } + + rank-profile default { + first-phase { + expression: nativeRank + } + } + rank-profile rp1 inherits default { + #static-rank: weight1 + } + rank-profile rp2 inherits default { + #static-rank: weight2 + } + + +} diff --git a/vespa-documentgen-plugin/etc/localapp/video.sd b/vespa-documentgen-plugin/etc/localapp/video.sd new file mode 100644 index 00000000000..fc7f58298c1 --- /dev/null +++ b/vespa-documentgen-plugin/etc/localapp/video.sd @@ -0,0 +1,54 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +search video { + document video inherits common { + field director type string { + bolding: on + # index-to: default, director + indexing: index|summary + } + field disp_actor type string { + bolding: on + # index-to: default, disp_actor + indexing: index|summary + } + field actor type string { + bolding: on + # index-to: default, actor + indexing: index|summary + } + field fmt type string { + # index-to: default, fmt + indexing: index|summary + } + field isbn type string { + bolding: on + # index-to: default, isbn + indexing: index|summary + } + field year type int { + indexing: attribute|index|summary + } + } + + field sw1 type float { + indexing { + input weight * 6 + input w1 + input w2 | summary; + } + } + + field didinteger type array { + indexing: input did | split " " | for_each { to_int } | attribute + } + + rank-profile default { + first-phase { + expression: nativeRank + } + } + rank-profile rp1 inherits default { + #static-rank: weight1 + } + rank-profile rp2 inherits default { + #static-rank: weight2 + } +} diff --git a/vespa-documentgen-plugin/etc/music/music.sd b/vespa-documentgen-plugin/etc/music/music.sd new file mode 100644 index 00000000000..5295b1bf449 --- /dev/null +++ b/vespa-documentgen-plugin/etc/music/music.sd @@ -0,0 +1,53 @@ +# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +# A basic search definition - called music, should be saved to music.sd +search music { + + # It contains one document type only - called music as well + document music { + + field title type string { + indexing: summary | index # How this field should be indexed + weight: 75 # Ranking importancy of this field, used by the built in nativeRank feature + } + + field artist type string { + indexing: summary | attribute | index + weight: 25 + } + + field year type int { + indexing: summary | attribute + } + + # Increase query + field popularity type int { + indexing: summary | attribute + } + + field eitheror type bool { + indexing: summary | attribute + } + + field url type uri { + indexing: summary | index + } + + } + + rank-profile default inherits default { + first-phase { + expression: nativeRank(title,artist) + attribute(popularity) + } + + } + + rank-profile textmatch inherits default { + first-phase { + expression: nativeRank(title,artist) + } + + } + + + +} diff --git a/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java b/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java index 72a3209a8fd..a65701fe261 100644 --- a/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java +++ b/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java @@ -1,10 +1,11 @@ -// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa; import com.yahoo.document.DataType; import com.yahoo.document.StructDataType; import com.yahoo.document.WeightedSetDataType; import com.yahoo.searchdefinition.Search; +import org.junit.Ignore; import org.junit.Test; import java.io.File; @@ -15,17 +16,13 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; public class DocumentGenTest { - private static final File schemasDir = new File("src/test/resources/schemas/"); - private static final File musicSchemaDir = new File(schemasDir, "music/"); - private static final File complexSchemaDir = new File(schemasDir, "complex/"); - private static final File localappSchemaDir = new File(schemasDir, "localapp/"); @Test public void testMusic() { DocumentGenMojo mojo = new DocumentGenMojo(); - mojo.execute(musicSchemaDir, new File("target/generated-test-sources/vespa-documentgen-plugin/"), "com.yahoo.vespa.document"); + mojo.execute(new File("etc/music/"), new File("target/generated-test-sources/vespa-documentgen-plugin/"), "com.yahoo.vespa.document"); Map searches = mojo.getSearches(); - assertEquals(searches.size(), 1); + assertEquals(searches.size(),1); assertEquals(searches.get("music").getDocument("music").getField("title").getDataType(), DataType.STRING); assertEquals(searches.get("music").getDocument("music").getField("eitheror").getDataType(), DataType.BOOL); } @@ -33,7 +30,7 @@ public class DocumentGenTest { @Test public void testComplex() { DocumentGenMojo mojo = new DocumentGenMojo(); - mojo.execute(complexSchemaDir, new File("target/generated-test-sources/vespa-documentgen-plugin/"), "com.yahoo.vespa.document"); + mojo.execute(new File("etc/complex/"), new File("target/generated-test-sources/vespa-documentgen-plugin/"), "com.yahoo.vespa.document"); Map searches = mojo.getSearches(); assertEquals(searches.get("video").getDocument("video").getField("weight").getDataType(), DataType.FLOAT); assertEquals(searches.get("book").getDocument("book").getField("sw1").getDataType(), DataType.FLOAT); @@ -47,7 +44,7 @@ public class DocumentGenTest { @Test public void testLocalApp() { DocumentGenMojo mojo = new DocumentGenMojo(); - mojo.execute(localappSchemaDir, new File("target/generated-test-sources/vespa-documentgen-plugin/"), "com.yahoo.vespa.document"); + mojo.execute(new File("etc/localapp/"), new File("target/generated-test-sources/vespa-documentgen-plugin/"), "com.yahoo.vespa.document"); Map searches = mojo.getSearches(); assertEquals(searches.get("video").getDocument("video").getField("weight").getDataType(), DataType.FLOAT); assertTrue(searches.get("book").getDocument("book").getField("mystruct").getDataType() instanceof StructDataType); diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/book.sd b/vespa-documentgen-plugin/src/test/resources/schemas/complex/book.sd deleted file mode 100644 index 6d6145cb10b..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/book.sd +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search book { - document book inherits common { - struct ss0 { - field s0 type string{} - field d0 type double{} - } - struct ss1 { - field s1 type string { } - field l1 type long { } - field i1 type int { } - field d1 type double { } - field as1 type array { } - field al1 type array { } - field ss01 type ss0 {} - } - - struct ss2 { - field s21 type string {} - field ss02 type ss0 {} - } - - field mystruct type ss1 { - } - - field mystruct2 type ss2 {} - - field mywsfloat type weightedset { - indexing: attribute - } - - field mynestedwsfloat type weightedset {} - - field myarrayint type array { - indexing: attribute - } - - field stringmap type map { - } - - field structmap type map { - } - - field mysinglestructarray type array {} - - #field mydoublestructarray type array> {} - - field author type string { - bolding: on - # index-to: default, author - indexing: summary | index - } - field isbn type string { - # index-to: default, isbn - indexing: summary | index - } - field year type int { - indexing: summary | index - } - field description type string { - # index-to: default, description - indexing: summary | index - summary: dynamic - } - } - - field sw1 type float { - indexing { - input weight * 6 + input w1 + input w2 | summary; - } - } - - field didinteger type array { - indexing: input did | split " " | for_each { to_int } | attribute - } - - rank-profile default { - first-phase { - expression: nativeRank - } - } - rank-profile rp1 inherits default { - #static-rank: weight1 - } - rank-profile rp2 inherits default { - #static-rank: weight2 - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/common.sd b/vespa-documentgen-plugin/src/test/resources/schemas/complex/common.sd deleted file mode 100644 index e0505eba05b..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/common.sd +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search common { - document common { - field uri type string { - indexing: summary - } - field title type string { - bolding: on - # index-to: default, title - indexing: index|summary - summary-to: smallsum - } - field mid type int { - indexing: attribute|index|summary - } - field scorekey type string { - indexing: summary - } - field weight type float { - indexing: attribute | summary - } - field w1 type float { - indexing: summary - } - field w2 type float { - indexing: summary - } - field did type string { - indexing: attribute|index|summary - } - field ew type string { - indexing: index|summary - } - } - rank-profile default { - first-phase { - expression: nativeRank - } - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/common2.sd b/vespa-documentgen-plugin/src/test/resources/schemas/complex/common2.sd deleted file mode 100644 index e32d3ed6751..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/common2.sd +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search common2 { - document { - field com2 type string { - - } - } -} - diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/music2.sd b/vespa-documentgen-plugin/src/test/resources/schemas/complex/music2.sd deleted file mode 100644 index 2e2d96ecdec..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/music2.sd +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search music2 { - document music2 inherits common { - field artist type string { - bolding: on - # index-to: default, artist - indexing: index|summary - } - field disp_song type string { - indexing: summary - } - field song type string { - # index-to: default, song - indexing: index - } - field isbn type string { - bolding: on - # index-to: default, isbn - indexing: index|summary - } - field year type int { - indexing: attribute|index|summary - } - annotation recordlabel {} - - annotation person { - field name type string { } - } - - annotation artist inherits person { - field instrument type int { } - } - - annotation date { - field exacttime type long { } - } - - annotation place { - field lat type long { } - field lon type long { } - } - - annotation event { - field description type string { } - field person type annotationreference { } - field date type annotationreference { } - field place type annotationreference { } - } - - } - - field sw1 type float { - indexing { - input weight * 6 + input w1 + input w2 | summary; - } - } - - field didinteger type array { - indexing: input did | split " " | for_each { to_int } | attribute - } - - rank-profile default { - first-phase { - expression: nativeRank - } - } - rank-profile rp1 inherits default { - #static-rank: weight1 - } - rank-profile rp2 inherits default { - #static-rank: weight2 - } - -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/music3.sd b/vespa-documentgen-plugin/src/test/resources/schemas/complex/music3.sd deleted file mode 100644 index 8bd612268df..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/music3.sd +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search music3 { - document music3 inherits music2, common2 { - field mu3 type string { - - } - field pos type position { - indexing: attribute - } - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/sombrerowebdoc.sd.FOO b/vespa-documentgen-plugin/src/test/resources/schemas/complex/sombrerowebdoc.sd.FOO deleted file mode 100644 index 1524e7480a0..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/sombrerowebdoc.sd.FOO +++ /dev/null @@ -1,73 +0,0 @@ -search sombrerowebdoc { - - document sombrerowebdoc { - version : 0 - - struct sombreroattribute { - field attributetype type int {} - field intvalue type int {} - field huffmanindex type int {} - field lexicon type string {} - field name type string {} - field strvalue type string {} - } - - annotation sombreroTOKEN { } - - annotation sombreroPHRASE { - field prefixused type int {} - field suffixused type int {} - field attributes type array {} - field annotationreferences type array> {} - } - - struct sombrerocontentfilter { - field id type string {} - field value type string {} - } - - struct sombrerorule { - field name type string {} - field location type string {} - field contentfilters type array {} - } - - struct sombrerometrics { - field executiontime type double {} - } - - struct sombreroextraction { - field adjuncts type string {} - field metrics type sombrerometrics {} - field status type string {} - } - - - field url type string {} - - field raw_html type string {} - - field decoded_html type string {} - - field rules type array {} - - field extraction type sombreroextraction {} - - field content_language type string {} - - field dupdetectshinglesketch type string {} - - field mlprisma type string {} - - field raw_bytes type raw {} - - field charset_encoding type string {} - - field meta_language type string {} - - field language type string {} - - field region type string {} - - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/complex/video.sd b/vespa-documentgen-plugin/src/test/resources/schemas/complex/video.sd deleted file mode 100644 index 0b0298a162c..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/complex/video.sd +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search video { - document video inherits common { - field director type string { - bolding: on - indexing: index|summary - } - field disp_actor type string { - bolding: on - indexing: index|summary - } - field actor type string { - bolding: on - indexing: index|summary - } - field fmt type string { - indexing: index|summary - } - field isbn type string { - bolding: on - indexing: index|summary - } - field year type int { - indexing: attribute|index|summary - } - } - - field sw1 type float { - indexing { - input weight * 6 + input w1 + input w2 | summary; - } - } - - field didinteger type array { - indexing: input did | split " " | for_each { to_int } | attribute - } - - rank-profile default { - first-phase { - expression: file:non-existing.expression - } - } - rank-profile rp1 inherits default { - #static-rank: weight1 - } - rank-profile rp2 inherits default { - #static-rank: weight2 - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/book.sd b/vespa-documentgen-plugin/src/test/resources/schemas/localapp/book.sd deleted file mode 100644 index 72faa934aa6..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/book.sd +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search book { - document book inherits common { - struct ss0 { - field s0 type string{} - field d0 type double{} - } - struct ss1 { - field s1 type string { } - field l1 type long { } - field i1 type int { } - field d1 type double { } - field as1 type array { } - field al1 type array { } - field ss01 type ss0 {} - } - - struct ss2 { - field s21 type string {} - field ss02 type ss0 {} - } - - field mystruct type ss1 { - } - - field mystruct2 type ss2 {} - - field mywsfloat type weightedset { - indexing: attribute - } - - field myarrayint type array { - indexing: attribute - } - - field mytriplearray type array>> {} - - field stringmap type map { - } - - field structmap type map { - } - - field mysinglestructarray type array {} - #field mydoublestructarray type array> {} - - field author type string { - bolding: on - # index-to: default, author - indexing: summary | index - } - field isbn type string { - # index-to: default, isbn - indexing: summary | index - } - field year type int { - indexing: summary | index - } - field description type string { - # index-to: default, description - indexing: summary | index - summary: dynamic - } - - field myraw type raw {} - } - - field sw1 type float { - indexing { - input weight * 6 + input w1 + input w2 | summary; - } - } - - field didinteger type array { - indexing: input did | split " " | for_each { to_int } | attribute - } - - rank-profile default { - first-phase { - expression: nativeRank - } - } - rank-profile rp1 inherits default { - #static-rank: weight1 - } - rank-profile rp2 inherits default { - #static-rank: weight2 - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/common.sd b/vespa-documentgen-plugin/src/test/resources/schemas/localapp/common.sd deleted file mode 100644 index 724897b4e7f..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/common.sd +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search common { - document common { - field uri type string { - indexing: summary - } - field title type string { - bolding: on - # index-to: default, title - indexing: index|summary - summary-to: smallsum - } - field mid type int { - indexing: attribute|index|summary - } - field scorekey type string { - indexing: summary - } - field weight type float { - indexing: attribute|summary - } - field w1 type float { - indexing: summary - } - field w2 type float { - indexing: summary - } - field did type string { - indexing: attribute|index|summary - } - field ew type string { - indexing: index|summary - } - annotation date { - field exacttime type long { } - } - - annotation emptyannotation {} - } - rank-profile default { - first-phase { - expression: nativeRank - } - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/music.sd b/vespa-documentgen-plugin/src/test/resources/schemas/localapp/music.sd deleted file mode 100644 index e00e046f511..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/music.sd +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search music { - document music inherits common { - field artist type string { - bolding: on - # index-to: default, artist - indexing: index|summary - } - field disp_song type string { - indexing: summary - } - field song type string { - # index-to: default, song - indexing: index - } - field isbn type string { - bolding: on - # index-to: default, isbn - indexing: index|summary - } - field year type int { - indexing: attribute|index|summary - } - annotation recordlabel {} - - annotation person { - field name type string { } - } - - annotation artist inherits person { - field instrument type int { } - } - - annotation place { - field lat type long { } - field lon type long { } - } - - annotation event { - field description type string { } - field person type annotationreference { } - field date type annotationreference { } - field place type annotationreference { } - } - } - - field sw1 type float { - indexing { - input weight * 6 + input w1 + input w2 | summary; - } - } - - field didinteger type array { - indexing: input did | split " " | for_each { to_int } | attribute - } - - rank-profile default { - first-phase { - expression: nativeRank - } - } - rank-profile rp1 inherits default { - #static-rank: weight1 - } - rank-profile rp2 inherits default { - #static-rank: weight2 - } - - -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/video.sd b/vespa-documentgen-plugin/src/test/resources/schemas/localapp/video.sd deleted file mode 100644 index fc7f58298c1..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/localapp/video.sd +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -search video { - document video inherits common { - field director type string { - bolding: on - # index-to: default, director - indexing: index|summary - } - field disp_actor type string { - bolding: on - # index-to: default, disp_actor - indexing: index|summary - } - field actor type string { - bolding: on - # index-to: default, actor - indexing: index|summary - } - field fmt type string { - # index-to: default, fmt - indexing: index|summary - } - field isbn type string { - bolding: on - # index-to: default, isbn - indexing: index|summary - } - field year type int { - indexing: attribute|index|summary - } - } - - field sw1 type float { - indexing { - input weight * 6 + input w1 + input w2 | summary; - } - } - - field didinteger type array { - indexing: input did | split " " | for_each { to_int } | attribute - } - - rank-profile default { - first-phase { - expression: nativeRank - } - } - rank-profile rp1 inherits default { - #static-rank: weight1 - } - rank-profile rp2 inherits default { - #static-rank: weight2 - } -} diff --git a/vespa-documentgen-plugin/src/test/resources/schemas/music/music.sd b/vespa-documentgen-plugin/src/test/resources/schemas/music/music.sd deleted file mode 100644 index 5295b1bf449..00000000000 --- a/vespa-documentgen-plugin/src/test/resources/schemas/music/music.sd +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -# A basic search definition - called music, should be saved to music.sd -search music { - - # It contains one document type only - called music as well - document music { - - field title type string { - indexing: summary | index # How this field should be indexed - weight: 75 # Ranking importancy of this field, used by the built in nativeRank feature - } - - field artist type string { - indexing: summary | attribute | index - weight: 25 - } - - field year type int { - indexing: summary | attribute - } - - # Increase query - field popularity type int { - indexing: summary | attribute - } - - field eitheror type bool { - indexing: summary | attribute - } - - field url type uri { - indexing: summary | index - } - - } - - rank-profile default inherits default { - first-phase { - expression: nativeRank(title,artist) + attribute(popularity) - } - - } - - rank-profile textmatch inherits default { - first-phase { - expression: nativeRank(title,artist) - } - - } - - - -} -- cgit v1.2.3