summaryrefslogtreecommitdiffstats
path: root/vespa-documentgen-plugin/etc
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-06-15 23:09:44 +0200
commit72231250ed81e10d66bfe70701e64fa5fe50f712 (patch)
tree2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /vespa-documentgen-plugin/etc
Publish
Diffstat (limited to 'vespa-documentgen-plugin/etc')
-rw-r--r--vespa-documentgen-plugin/etc/complex/book.sd90
-rw-r--r--vespa-documentgen-plugin/etc/complex/common.sd46
-rw-r--r--vespa-documentgen-plugin/etc/complex/music2.sd74
-rw-r--r--vespa-documentgen-plugin/etc/complex/sombrerowebdoc.sd.FOO73
-rw-r--r--vespa-documentgen-plugin/etc/complex/video.sd49
-rw-r--r--vespa-documentgen-plugin/etc/localapp/book.sd91
-rw-r--r--vespa-documentgen-plugin/etc/localapp/common.sd51
-rw-r--r--vespa-documentgen-plugin/etc/localapp/music.sd70
-rw-r--r--vespa-documentgen-plugin/etc/localapp/video.sd54
-rw-r--r--vespa-documentgen-plugin/etc/music/music.sd57
10 files changed, 655 insertions, 0 deletions
diff --git a/vespa-documentgen-plugin/etc/complex/book.sd b/vespa-documentgen-plugin/etc/complex/book.sd
new file mode 100644
index 00000000000..4b3c85a96de
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/complex/book.sd
@@ -0,0 +1,90 @@
+# Copyright 2016 Yahoo Inc. 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<string> { }
+ field al1 type array<long> { }
+ 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<float> {
+ indexing: attribute
+ attribute: prefetch
+ }
+
+ field mynestedwsfloat type weightedset<weightedset<float>> {}
+
+ field myarrayint type array<int> {
+ indexing: attribute
+ attribute: prefetch
+ }
+
+ field stringmap type map<string, string> {
+ }
+
+ field structmap type map<int, ss1> {
+ }
+
+ field mysinglestructarray type array<ss1> {}
+
+ #field mydoublestructarray type array<array<ss1>> {}
+
+ 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<int> {
+ 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..6441884b506
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/complex/common.sd
@@ -0,0 +1,46 @@
+# Copyright 2016 Yahoo Inc. 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 {
+ input weight * 10 | attribute | summary;
+ }
+ }
+ field w1 type float {
+ indexing {
+ input weight * 6 + input w1 | summary;
+ }
+ }
+ field w2 type float {
+ indexing {
+ input w2 + input weight | 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/music2.sd b/vespa-documentgen-plugin/etc/complex/music2.sd
new file mode 100644
index 00000000000..4428e0d1c43
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/complex/music2.sd
@@ -0,0 +1,74 @@
+# Copyright 2016 Yahoo Inc. 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<person> { }
+ field date type annotationreference<date> { }
+ field place type annotationreference<place> { }
+ }
+
+ }
+
+ field sw1 type float {
+ indexing {
+ input weight * 6 + input w1 + input w2 | summary;
+ }
+ }
+
+ field didinteger type array<int> {
+ indexing: input did | split " " | 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/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<sombreroattribute> {}
+ field annotationreferences type array<annotationreference<sombreroTOKEN>> {}
+ }
+
+ struct sombrerocontentfilter {
+ field id type string {}
+ field value type string {}
+ }
+
+ struct sombrerorule {
+ field name type string {}
+ field location type string {}
+ field contentfilters type array<sombrerocontentfilter> {}
+ }
+
+ 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<sombrerorule> {}
+
+ 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..3714cd95bc2
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/complex/video.sd
@@ -0,0 +1,49 @@
+# Copyright 2016 Yahoo Inc. 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<int> {
+ 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/book.sd b/vespa-documentgen-plugin/etc/localapp/book.sd
new file mode 100644
index 00000000000..fe9f6b6dcef
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/localapp/book.sd
@@ -0,0 +1,91 @@
+# Copyright 2016 Yahoo Inc. 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<string> { }
+ field al1 type array<long> { }
+ 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<float> {
+ indexing: attribute
+ attribute: prefetch
+ }
+
+ field myarrayint type array<int> {
+ indexing: attribute
+ attribute: prefetch
+ }
+
+ field mytriplearray type array<array<array<int>>> {}
+
+ field stringmap type map<string, string> {
+ }
+
+ field structmap type map<int, ss1> {
+ }
+
+ field mysinglestructarray type array<ss1> {}
+ #field mydoublestructarray type array<array<ss1>> {}
+
+ 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<int> {
+ 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..32dd440fe3c
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/localapp/common.sd
@@ -0,0 +1,51 @@
+# Copyright 2016 Yahoo Inc. 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 {
+ input weight * 10 | attribute | summary;
+ }
+ }
+ field w1 type float {
+ indexing {
+ input weight * 6 + input w1 | summary;
+ }
+ }
+ field w2 type float {
+ indexing {
+ input w2 + input weight | 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..dbbd70d1054
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/localapp/music.sd
@@ -0,0 +1,70 @@
+# Copyright 2016 Yahoo Inc. 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<person> { }
+ field date type annotationreference<date> { }
+ field place type annotationreference<place> { }
+ }
+ }
+
+ field sw1 type float {
+ indexing {
+ input weight * 6 + input w1 + input w2 | summary;
+ }
+ }
+
+ field didinteger type array<int> {
+ indexing: input did | split " " | 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..3106477b244
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/localapp/video.sd
@@ -0,0 +1,54 @@
+# Copyright 2016 Yahoo Inc. 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<int> {
+ 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..668bce263bb
--- /dev/null
+++ b/vespa-documentgen-plugin/etc/music/music.sd
@@ -0,0 +1,57 @@
+# Copyright 2016 Yahoo Inc. 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
+ # index-to: title, default # Create two indexes
+ weight: 75 # Ranking importancy of this field, used by the built in nativeRank feature
+ header
+ }
+
+ field artist type string {
+ indexing: summary | attribute | index
+ # index-to: artist, default
+
+ weight: 25
+ header
+ }
+
+ field year type int {
+ indexing: summary | attribute
+ header
+ }
+
+ # Increase query
+ field popularity type int {
+ indexing: summary | attribute
+ body
+ }
+
+ field url type uri {
+ indexing: summary | index
+ header
+ }
+
+ }
+
+ rank-profile default inherits default {
+ first-phase {
+ expression: nativeRank(title,artist) + attribute(popularity)
+ }
+
+ }
+
+ rank-profile textmatch inherits default {
+ first-phase {
+ expression: nativeRank(title,artist)
+ }
+
+ }
+
+
+
+}