aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/derived/multiplesummaries/multiplesummaries.sd
blob: 28eaec227845daebc74ca0c7b1283974ac4c7750 (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
schema multiplesummaries {

  document multiplesummaries {

    field a type string {
      indexing: summary | attribute
      summary-to: default, second
      match {
        token
      }
    }

    field adynamic type string {
      indexing: summary | attribute
      summary-to: default, second
      summary adynamic: dynamic
      match {
        token
      }
    }

    field abolded type string {
      indexing: summary | attribute
      bolding: on
      match {
        token
      }
    }

    field b type string {
      indexing: summary
      bolding: off
    }

    field c type string {
      indexing: summary | attribute
      summary-to: second
      match {
        token
      }
    }

    field d type string {
      indexing: summary
      bolding: on
    }

    field e type string {
      indexing: summary
      summary dynamice: dynamic
    }

    field f type array<string> {
      indexing: summary
      summary-to: second
    }

    field g type array<int> {
      indexing: summary
    }

    field h type weightedset<string> {
      indexing: summary
      weightedset: create-if-nonexistent
    }

    field loc type string {

    }

    field mytags type array<string> {
      indexing: index
    }
  }

  field loc_pos type position {
    indexing: input loc | to_pos | attribute | summary
  }

  document-summary third {

    summary a {
    }

    summary adynamic {
    }

    summary d {
    }

    summary e {
    }

    summary f {
    }

    summary g {
    }

    summary h {
    }

  }

  document-summary attributesonly1 {

    summary a {
    }

    summary c {
    }

  }

  # Since a here is a dynamic summary field, it will be fetched from disk
  document-summary notattributesonly1 {

    summary adynamic { # Should still be dynamic here
    }

    summary c {
    }

  }

  # Since a here is a dynamic summary, it will be fetched from disk
  document-summary anothernotattributesonly2 {

    summary adynamic2 { # Should still be dynamic here
        source: a
        dynamic
    }

    summary c {
    }

    summary alltags {
        source: mytags
    }
    summary sometags {
        source: mytags
        matched-elements-only
    }
    summary anothera {
        source: a
    }
    summary anotherb {
        source: b
    }
  }

  # Not attributes only because d is bolded
  document-summary notattributesonly3 {

    summary a {
    }

    summary d {
    }

  }

  document-summary attributesonly2 {

    summary anotdynamic { # Should not be dynamic here
        source: adynamic
    }

    summary c {
    }

    summary loc_position {
        source: loc_pos_zcurve
    }

  }

  document-summary attributesonly3 {

    summary a {
    }

    summary anotbolded {
        source: a
    }

    summary loc_pos_zcurve {
    }

  }

  document-summary notattributesonly4 {

    summary abolded2 {
        source: a
        bolding: on
    }

    summary c {
    }

  }

  document-summary notattributesonly5 {

    summary aboldeddynamic {
        source: a
        dynamic
        bolding: on
    }

    summary c {
    }

  }

}