-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.yml.tmpl
477 lines (471 loc) · 16.8 KB
/
configuration.yml.tmpl
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
---
common:
debug: no
context_uri: yes # if false, displays the full JSON-LD context inline
secret: app-secret
sentry:
dsn: sentry-dsn-value
environment: "develop"
solr:
server: "http://localhost:8983/solr/muscatplus_live"
search:
rows: 20
page_sizes:
- 20
- 40
- 100
suggestions: 10
default_mode: "sources"
facet_definitions:
# Defines facets for use in specific modes. Facets are pre-defined here and used below so that they
# only need to be defined once and then can be used as appropriate in the 'filters' section below.
#
# Allowed values for 'type' are:
# - range: Creates a range facet over a set of scalar values (e.g., years).
# - stats: Creates a read-only facet with some interesting pre-defined stats. (Not yet implemented)
# - toggle: Creates a simple on / off facet with a true or false value. Used only on boolean fields.
# - select: Creates a facet of values. For these facets, a 'behaviour' query parameter ('fb') sets
# the behaviour of 'intersection' or 'union' at query-time More below.
# - query: Creates a text input box for querying values. Multiple values can be entered, and the behaviour
# query parameter can choose between how these values are interepreted, like the select box.
# - notation: Creates a notation search facet, which will be rendered as a keyboard in the user interface
#
# Toggle facets have a field, 'active_value', which gives the value of the field when the toggle is switched 'on'.
# This is not always intuitive -- if we want to filter out records who have a 'true' value for a given field,
# then the 'active_value' must be 'false'. This is made even more confusing by the fact that toggle facets will
# only be active when they are given as a query parameter. So to give an example of how a query parameter might:
# translate to a Solr query:
#
# ?fq=hide-source-contents:true --> is_contents_record_b:false
# ?fq=hide-source-contents:false -> (no filter on is_contents_record_b, which is the same as is_contents_record_b:true OR false)
#
# Select facets take a number of optional query parameters to control their behaviour.
#
# Select facet configurations can take a 'values' dictionary to provide translations of the values. This
# is in the form of 'solr_value: "translation.key"'. If a values field is not provided, then
# the facet will display the values as indexed in Solr.
#
# By default, select facets operate as 'intersection', which is the expected behaviour from a facet;
# 'union' turns the facet into a multi-value select.
#
# Some examples:
# ?fq=source-type:foo&fq=source-type:bar <-- default method, 'intersection'. Only sources of
# both type 'foo' and 'bar' are kept.
# ?fq=source-type:foo&fq=source-type:bar&fb=source-type:union <-- 'union'. Shows *all* sources who
# have either type 'foo' or type 'bar'.
# ?fq=source-type:foo&fq=source-type:bar&fb=source-type:intersection <-- same as the default method,
# but the behaviour is explicitly defined.
#
# You can set the default behaviour of a facet using the 'default_behaviour' option on the config. Acceptable
# values are 'intersection' and 'union'.
#
# You can set the default sort behaviour using the 'default_sort' configuration for select facets.
#
# For facets that can have translations, you can set the `translation_prefix` configuration. This gives the
# section of the 'locale' file to look in and will append the Solr value on the end -- for example, if the
# stored value of a language is `lat` (for Latin) in Solr, then the translation prefix is `langcodes`. This
# will then look up the value for `langcodes.lat` in the locales file, and provide a translated facet value.
#
# Query facets will show a text box on the page, allowing a user to query a specific solr field. The field that
# will be queried is given in the 'field' configuration. Query fields can have multiple values, so they can also
# take the 'behaviour' option which will allow them to set whether the queried values are "anded" or "ored" when
# queried.
#
# Query facets also have a 'suggest_fields' parameter, which allows you to configure a solr suggestion.
# This is implemented using the TermsComponent, which takes terms from one or more fields.
#
SOURCE_TYPE: &SOURCE_TYPE
label: "records.type"
alias: "source-type"
type: "select"
field: "source_type_s"
default_sort: "count"
default_behaviour: "union"
translation_prefix: "rism_online"
MATERIAL_SOURCE_TYPES: &MATERIAL_SOURCE_TYPES
label: "records.source_type"
alias: "material-source-types"
type: "select"
field: "material_source_types_sm"
default_sort: "count"
MATERIAL_CONTENT_TYPES: &MATERIAL_CONTENT_TYPES
label: "records.content_type"
alias: "material-content-types"
type: "select"
field: "material_content_types_sm"
default_sort: "count"
DATE_RANGE: &DATE_RANGE
label: "records.dates"
alias: "date-range"
type: "range"
field: "date_ranges_im"
NUM_HOLDINGS: &NUM_HOLDINGS
label: "Number of holdings"
alias: "num-holdings"
type: "select"
field: "num_holdings_s"
HIDE_SOURCE_CONTENTS: &HIDE_SOURCE_CONTENTS
# Configures whether to show or hide Source Contents records.
label: "Hide source contents"
alias: "hide-source-contents"
type: "toggle"
field: "is_contents_record_b"
active_value: false
HIDE_SOURCE_COLLECTION_RECORDS: &HIDE_SOURCE_COLLECTION_RECORDS
label: "Hide collection records"
alias: "hide-source-collections"
type: "toggle"
field: "is_collection_record_b"
active_value: false
HIDE_SOURCE_COMPOSITE_VOLUMES: &HIDE_SOURCE_COMPOSITE_VOLUMES
label: "Hide composite volumes"
alias: "hide-composite-volumes"
type: "toggle"
field: "is_composite_volume_b"
active_value: false
HAS_DIGITIZATION: &HAS_DIGITIZATION
label: "Digital images available"
alias: "has-digitization"
type: "toggle"
field: "has_digitization_b"
active_value: true
HAS_IIIF_MANIFEST: &HAS_IIIF_MANIFEST
label: "IIIF Manifest available"
alias: "has-iiif"
type: "toggle"
field: "has_iiif_manifest_b"
active_value: true
SHOW_SOURCE_INCIPITS: &SHOW_SOURCE_INCIPITS
label: "Has incipits"
alias: "has-incipits"
type: "toggle"
field: "has_incipits_b"
active_value: true
SHOW_SOURCE_ARRANGEMENT: &SHOW_SOURCE_ARRANGEMENT
label: "records.arrangement"
alias: "is-arrangement"
type: "toggle"
field: "is_arrangement_b"
active_value: true
PERSON_ROLES: &PERSON_ROLES
label: "records.role"
alias: "roles"
type: "select"
field: "roles_sm"
default_sort: "count"
default_behaviour: "intersection"
translation_values:
"arr": "records.arranger"
"asg": "records.assignee"
"asn": "records.associated_name"
"aut": "records.author"
"bnd": "records.binder"
"bsl": "records.bookseller"
"ccp": "records.conceptor"
"cmp": "records.composer"
"cns": "records.censor"
"cph": "records.copyright_holder"
"cre": "records.composer_author"
# A special case, where the cre relator code is used to label the 100 main entry field.
"ctb": "records.contributor"
"dnc": "records.dancer"
"dnr": "records.donor"
"dpt": "records.depositor"
"dst": "records.distributor"
"dte": "records.dedicatee"
"edt": "records.editor"
"egr": "records.engraver"
"evp": "records.event_place"
"fmo": "records.former_owner"
"ill": "records.illustrator"
"lbt": "records.librettist"
"lse": "records.licensee"
"ltg": "records.lithographer"
"lyr": "records.lyricist"
"oth": "records.other"
"pbl": "records.publisher"
"ppm": "records.papermaker"
"prf": "records.performer"
"prt": "records.printer"
"scr": "records.copyist"
"trl": "records.translator"
"tyd": "records.type_designer"
PERSON_PROFESSION: &PERSON_PROFESSION
label: "records.profession_or_function"
alias: "profession"
type: "select"
field: "profession_function_sm"
default_sort: "count"
default_behaviour: "intersection"
PERSON_ASSOCIATED_PLACE: &PERSON_ASSOCIATED_PLACE
label: "records.associated_place"
alias: "associated-place"
type: "select"
field: "place_names_sm"
default_sort: "alpha"
PERSON_GENDER: &PERSON_GENDER
label: "records.gender"
alias: "gender"
type: "select"
field: "gender_s"
default_sort: "count"
translation_values:
male: "general.male"
female: "general.female"
unknown: "records.unknown"
INSTITUTION_CITY: &INSTITUTION_CITY
label: "records.city"
alias: "city"
type: "select"
field: "city_s"
default_sort: "count"
SOURCE_HOLDING_INSTITUTION: &SOURCE_HOLDING_INSTITUTION
label: "Source holding institution"
alias: "holding-institution"
type: "select"
field: "holding_institutions_sm"
default_sort: "count"
FORMAT_EXTENT: &FORMAT_EXTENT
label: "records.format_extent"
alias: "format-extent"
type: "select"
field: "format_extent_sm"
default_sort: "count"
SOURCE_SUBJECTS: &SOURCE_SUBJECTS
label: "records.subject_headings"
alias: "subjects"
type: "select"
field: "subjects_sm"
default_sort: "count"
TEXT_LANGUAGE: &TEXT_LANGUAGE
label: "records.language_text"
alias: "text-language"
type: "select"
field: "language_text_sm"
default_sort: "count"
translation_prefix: "langcodes"
NOTATION: &NOTATION
label: "Notation"
alias: "notation"
type: "notation"
CLEF: &CLEF
label: "records.clef"
alias: "clef"
type: "select"
field: "clef_s"
default_sort: "count"
default_behaviour: "union"
KEY_SIGNATURE: &KEY_SIGNATURE
label: "records.key_signature"
alias: "key-signature"
type: "select"
field: "norm_key_s"
default_sort: "count"
default_behaviour: "union"
TIME_SIGNATURE: &TIME_SIGNATURE
label: "records.time_signature"
alias: "time-signature"
type: "select"
field: "timesig_s"
default_sort: "count"
default_behaviour: "union"
IS_MENSURAL: &IS_MENSURAL
label: "Mensural encoding"
alias: "is-mensural"
type: "toggle"
field: "is_mensural_b"
active_value: true
IS_ARRANGEMENT: &IS_ARRANGEMENT
label: "Is Arrangement"
alias: "is-arrangement"
type: "toggle"
field: "is_arrangement_b"
active_value: true
HAS_NOTATION: &HAS_NOTATION
label: "Has notation"
alias: "has-notation"
type: "toggle"
field: "has_notation_b"
active_value: true
CREATOR_NAME: &CREATOR_NAME
label: "records.composer_author"
alias: "composer"
type: "select"
field: "creator_name_s"
default_sort: "count"
default_behaviour: "union"
SCORING: &SCORING
label: "records.scoring_summary"
alias: "scoring"
type: "query"
field: "scoring_ti"
suggest_fields:
- "scoring_sm"
ALL_PEOPLE: &ALL_PEOPLE
label: "records.related_personal_name"
alias: "people"
type: "select"
field: "people_names_sm"
default_sort: "count"
RELATED_INSTITUTIONS: &RELATED_INSTITUTIONS
label: "records.related_institution"
alias: "related-institutions"
type: "query"
field: "related_institutions_sm"
suggest_fields:
- "related_institutions_sm"
SIGLA: &SIGLA
label: "records.sigla"
alias: "sigla"
type: "query"
field: "siglum_kw"
suggest_fields:
- "holding_institutions_sm"
HAS_SIGLUM: &HAS_SIGLUM
label: "Has siglum"
alias: "has-siglum"
type: "toggle"
field: "has_siglum_b"
active_value: true
sorting_definitions:
# label: The human-readable label for the sorting. This can either be a complete string, or it can be a key
# into a translation in the locales files. If the key is found in the translation, that will be used;
# otherwise the literal value given here will be used.
# alias: The value of the 'sort' field, e.g., ?sort=relevance. This ties the incoming sort request to the actual
# sort statements given in the solr_sort field
# solr_sort: Provides a list of sort statements that will be passed to Solr. This can be multivalued to allow
# for complex sorts to be aliased to a single `sort` parameter.
# only_contents: True | False (Default). Only display this sort order when looking at the source item contents.
# TODO: Translate
RELEVANCE: &RELEVANCE
label: "Most relevant"
alias: "relevance"
solr_sort:
- "score desc"
ALPHABETICAL_TITLE: &ALPHABETICAL_TITLE
label: "Alphabetical (Title, A-Z)"
alias: "alphabetical-title"
solr_sort:
- "main_title_ans asc"
ALPHABETICAL_NAME: &ALPHABETICAL_NAME
label: "Alphabetical (Name, A-Z)"
alias: "alphabetical-name"
solr_sort:
- "name_ans asc"
ALPHABETICAL_CREATOR: &ALPHABETICAL_CREATOR
label: "Alphabetical (Creator, A-Z)"
alias: "alphabetical-creator"
solr_sort:
- "creator_name_s asc"
DATE_ADDED: &DATE_ADDED
label: "Date Added (Newest first)"
alias: "date-added"
solr_sort:
- "created desc"
NUM_SOURCES: &NUM_SOURCES
label: "Number of sources"
alias: "num-sources"
solr_sort:
- "total_sources_i desc"
EARLIEST_DATE: &EARLIEST_DATE
label: "Earliest known date (Oldest first)"
alias: "earliest-date"
solr_sort:
- "earliest_date_i asc"
SOURCE_ORDER: &SOURCE_ORDER
label: "Source order"
alias: "source-order"
solr_sort:
- "source_membership_order_i asc"
modes:
# Defines the specific configuration for each mode. Search modes can have specific filters and sorts
# and these can use pre-defined blocks.
sources:
label: "records.sources"
record_type: "source"
filters:
- *HIDE_SOURCE_CONTENTS
- *HIDE_SOURCE_COLLECTION_RECORDS
- *HIDE_SOURCE_COMPOSITE_VOLUMES
- *HAS_DIGITIZATION
- *HAS_IIIF_MANIFEST
- *DATE_RANGE
- *NUM_HOLDINGS
- *SOURCE_TYPE
- *MATERIAL_SOURCE_TYPES
- *MATERIAL_CONTENT_TYPES
- *SHOW_SOURCE_INCIPITS
- *TEXT_LANGUAGE
- *SHOW_SOURCE_ARRANGEMENT
- *SOURCE_HOLDING_INSTITUTION
- *SOURCE_SUBJECTS
- *FORMAT_EXTENT
- *CREATOR_NAME
- *ALL_PEOPLE
- *IS_ARRANGEMENT
- *SCORING
- *SIGLA
- *RELATED_INSTITUTIONS
# Expands the sort block by marking a given block as default. This lets
# us use the same sort definition as default in one configuration, but
# not in another. If two blocks are marked as default, the first one that
# applies will be chosen. This means that if a block is marked as default
# and also as "only_contents", it will be chosen when applied to a contents
# block, but will be skipped when applied to the full search, and the second
# block marked as default will be chosen.
sorting:
- <<: *SOURCE_ORDER
default: true
only_contents: true
- <<: *RELEVANCE
default: true
- *ALPHABETICAL_TITLE
- *DATE_ADDED
people:
label: "records.people"
record_type: "person"
filters:
- *DATE_RANGE
- *PERSON_ROLES
- *PERSON_ASSOCIATED_PLACE
- *PERSON_GENDER
- *PERSON_PROFESSION
sorting:
- <<: *RELEVANCE
default: true
- *ALPHABETICAL_NAME
- *EARLIEST_DATE
- *DATE_ADDED
- *NUM_SOURCES
institutions:
label: "records.institutions"
record_type: "institution"
filters:
- *INSTITUTION_CITY
- *HAS_SIGLUM
sorting:
- <<: *RELEVANCE
default: true
- *ALPHABETICAL_NAME
- *DATE_ADDED
- *NUM_HOLDINGS_SORT
incipits:
label: "records.incipits"
record_type: "incipit"
filters:
- *NOTATION
- *CREATOR_NAME
- *DATE_RANGE
- *CLEF
- *IS_MENSURAL
- *HAS_NOTATION
- *KEY_SIGNATURE
- *TIME_SIGNATURE
sorting:
- <<: *RELEVANCE
default: true
- *ALPHABETICAL_CREATOR
- *ALPHABETICAL_TITLE
# festivals:
# label: "records.liturgical_festivals"
# record_type: "liturgical_festival"