aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-documentgen-plugin/etc/complex/book.sd
blob: 953244ba93fbbb2e263d95bd44edb58e439b6723 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright Vespa.ai. 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 mywsinteger type weightedset<int> {
        indexing: attribute
      }

      field mynestedwsinteger type weightedset<int> {}

      field myarrayint type array<int> {
        indexing: attribute
      }

      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
         indexing: summary | index
      }
      field isbn type string {
         indexing: summary | index
      }
      field year type int {
         indexing: summary | index
      }
      field description type string {
         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 {
   }
   rank-profile rp2 inherits default {
   }
}