From 4c947f764e0b03a360547bd47af4a344ea7129d3 Mon Sep 17 00:00:00 2001
From: Josef Moravec <josef.moravec@gmail.com>
Date: Fri, 8 Jul 2016 14:26:56 +0200
Subject: [PATCH] Add some RDA fields to authority index (#750)

---
 config/vufind/authority.ini           | 10 ++++++++++
 import/marc_auth.properties           | 12 ++++++++++++
 languages/cs.ini                      | 11 +++++++++++
 languages/en.ini                      | 11 +++++++++++
 solr/vufind/authority/conf/schema.xml | 14 +++++++++++++-
 5 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/config/vufind/authority.ini b/config/vufind/authority.ini
index 3a50ff6888b..39416f00551 100644
--- a/config/vufind/authority.ini
+++ b/config/vufind/authority.ini
@@ -23,6 +23,16 @@ heading   = "Heading"
 [Facets]
 source             = "Authority File"
 record_type        = "Record Type"
+field_of_activity    = "Field of activity"
+occupation         = "Occupation"
+gender             = "Gender"
+language           = "Language"
+;birth_date          = "Date of birth"
+;birth_place         = "Place of birth"
+;death_date          = "Date of death"
+;death_place         = "Place of death"
+country            = "Associated country"
+related_place       = "Other associated place"
 form_facet_str_mv  = "Form"
 general_facet_str_mv  = "General"
 chronological_facet_str_mv  = "Chronological"
diff --git a/import/marc_auth.properties b/import/marc_auth.properties
index cd6cf6e98b9..0513aeb8a41 100644
--- a/import/marc_auth.properties
+++ b/import/marc_auth.properties
@@ -21,3 +21,15 @@ heading = custom, getAllSubfields(100:110:111, " ")
 use_for = custom, getAllSubfields(400:410:411, " ")
 see_also = custom, getAllSubfields(500:510:511, " ")
 scope_note = custom, getAllSubfields(665:663:360, " ")
+
+# RDA fields
+birth_date = 046f, first
+death_date = 046g, first
+birth_place = 370a, first
+death_place = 370b, first
+country = 370c
+related_place = 370f
+field_of_activity = 372a
+occupation = 374a
+gender = 375a
+language = 377a, language_map.properties
diff --git a/languages/cs.ini b/languages/cs.ini
index e746be3ac22..09c2cd9227f 100644
--- a/languages/cs.ini
+++ b/languages/cs.ini
@@ -61,6 +61,7 @@ anonymous_tags = "Anonymní tagy"
 APA Citation = "Citace podle APA"
 Article = "Článek"
 Ask a Librarian = "Zeptejte se knihovníka"
+Associated country = "Související země"
 Audience = "Uživatelské určení"
 Audio = "Zvuková nahrávka"
 authentication_error_admin = "Při přihlášení došlo k chybě. Kontaktujte správce systému."
@@ -75,6 +76,7 @@ Author Browse = "Prohlížení mezi autory"
 Author Notes = "Poznámky autora"
 Author Results for = "Výsledky hledání pro autora"
 Author Search Results = "Výsledky hledání pro autora"
+Authority File = "Databáze autorit"
 Authors = "Autoři"
 Authors Related to Your Search = "Autoři relevantní k vašemu hledání"
 Auto configuration is currently disabled = "Automatická konfigurace je nyní vypnuta"
@@ -238,6 +240,8 @@ Create New Password = "Vytvořit nové heslo"
 Created = "Vytvořeno"
 Database = "Databáze"
 Date = "Datum"
+Date of birth = "Datum narození"
+Date of death = "Datum úmrtí"
 date_day_placeholder = "d"
 date_from = "Od"
 date_month_placeholder = "m"
@@ -355,6 +359,7 @@ Favorites = "Oblíbené"
 Fee = "Poplatek"
 Feedback = "Váš názor"
 feedback_name = "Jméno"
+Field of activity = "Oblast působení"
 File Description = "Popis souboru"
 Filter = "Filtr"
 filter_tags = "Filtrovat tagy"
@@ -378,6 +383,7 @@ From = "Od"
 Full description = "Celý popis"
 Full text is not displayed to guests = "Nepřihlášeným uživatelům se plný text nezobrazuje"
 fulltext_limit = "Omezit pouze na články s dostupným plným textem"
+Gender = "Pohlaví"
 Genre = "Žánr"
 Geographic Terms = "Geografický termín"
 Geography = "Geografie"
@@ -678,6 +684,7 @@ Number = "Číslo"
 number_decimal_point = ","
 number_thousands_separator = " "
 OAI Server = "OAI Server"
+Occupation = "Povolání"
 of = "z"
 old_password = "Staré heslo"
 On Reserve = "Rezervováno"
@@ -691,6 +698,7 @@ operator_exact = "rovná se"
 OR = "OR"
 or create a new list = "nebo vytvořit nový seznam"
 original = "Originál"
+Other associated place = "Další související místo"
 Other Authors = "Další autoři"
 Other Editions = "Další vydání"
 Other Libraries = "Další knihovny"
@@ -714,6 +722,8 @@ Physical Description = "Fyzický popis"
 Physical Object = "Fyzický předmět"
 pick_up_location = "Místo vyzvednutí"
 Place a Hold = "Požadavek"
+Place of birth = "Místo narození"
+Place of death = "Místo úmrtí"
 Playing Time = "Doba přehrávání"
 Please check back soon = "Prosím, zkuste to znovu později"
 Please contact the Library Reference Department for assistance = "Pro pomoc se obraťte na pracovníky knihovny:"
@@ -760,6 +770,7 @@ Recall This = "Rezervovat"
 recaptcha_not_passed = "Kód CAPTCHA nesouhlasí."
 Record Citations = "Citace záznamu"
 Record Count = "Počet záznamů"
+Record Type = "Typ záznamu"
 Recover Account = "Obnovit účet"
 recovery_by_email = "Obnovit pomocí emailu"
 recovery_by_username = "Obnovit pomocí uživatelského jména"
diff --git a/languages/en.ini b/languages/en.ini
index dde510cfde0..142c4805277 100644
--- a/languages/en.ini
+++ b/languages/en.ini
@@ -63,6 +63,7 @@ APA Citation = "APA Citation"
 applied_filter = "Applied Filter"
 Article = "Article"
 Ask a Librarian = "Ask a Librarian"
+Associated country = "Associated country"
 Audience = "Audience"
 Audio = "Audio"
 authentication_error_admin = "We cannot log you in at this time. Please contact your system administrator for assistance."
@@ -77,6 +78,7 @@ Author Browse = "Author Browse"
 Author Notes = "Author Notes"
 Author Results for = "Author Results for"
 Author Search Results = "Author Search Results"
+Authority File = "Authority File"
 Authors = "Authors"
 Authors Related to Your Search = "Authors Related to Your Search"
 Auto configuration is currently disabled = "Auto configuration is currently disabled"
@@ -240,6 +242,8 @@ Create New Password = "Create New Password"
 Created = "Created"
 Database = "Database"
 Date = "Date"
+Date of birth = "Date of birth"
+Date of death = "Date of death"
 date_day_placeholder = "D"
 date_from = "From"
 date_month_placeholder = "M"
@@ -358,6 +362,7 @@ Favorites = "Saved Items"
 Fee = "Fee"
 Feedback = "Feedback"
 feedback_name = "Name"
+Field of activity = "Field of activity"
 File Description = "File Description"
 Filter = "Filter"
 filter_tags = "Filter Tags"
@@ -381,6 +386,7 @@ From = "From"
 Full description = "Full description"
 Full text is not displayed to guests = "Full text is not displayed to guests."
 fulltext_limit = "Limit to articles with full text available"
+Gender = "Gender"
 Genre = "Genre"
 Geographic Terms = "Geographic Terms"
 Geography = "Geography"
@@ -681,6 +687,7 @@ Number = "Number"
 number_decimal_point = "."
 number_thousands_separator = ","
 OAI Server = "OAI Server"
+Occupation = "Occupation"
 of = "of"
 old_password = "Old Password"
 On Reserve = "On Reserve"
@@ -694,6 +701,7 @@ operator_exact = "is (exact)"
 OR = "OR"
 or create a new list = "or create a new list"
 original = "Original"
+Other associated place = "Other associated place"
 Other Authors = "Other Authors"
 Other Editions = "Other Editions"
 Other Libraries = "Other Libraries"
@@ -719,6 +727,8 @@ Physical Description = "Physical Description"
 Physical Object = "Physical Object"
 pick_up_location = "Pickup Location"
 Place a Hold = "Place a Hold"
+Place of birth = "Place of birth"
+Place of death = "Place of death"
 Playing Time = "Playing Time"
 Please check back soon = "Please check back soon"
 Please contact the Library Reference Department for assistance = "Please contact the Library Reference Department for assistance"
@@ -765,6 +775,7 @@ Recall This = "Recall This"
 recaptcha_not_passed = "CAPTCHA not passed"
 Record Citations = "Record Citations"
 Record Count = "Record Count"
+Record Type = "Record Type"
 Recover Account = "Recover Account"
 recovery_by_email = "Recover by email"
 recovery_by_username = "Recover by username"
diff --git a/solr/vufind/authority/conf/schema.xml b/solr/vufind/authority/conf/schema.xml
index 176b308c6de..c996a379774 100644
--- a/solr/vufind/authority/conf/schema.xml
+++ b/solr/vufind/authority/conf/schema.xml
@@ -45,7 +45,19 @@
     <field name="heading_keywords" type="text" indexed="true" stored="false"/>
     <field name="use_for_keywords" type="text" indexed="true" stored="false" multiValued="true"/>
     <field name="see_also_keywords" type="text" indexed="true" stored="false" multiValued="true"/>
-    
+
+    <!-- RDA fields -->
+    <field name="birth_date" type="string" indexed="true" stored="false"/>
+    <field name="death_date" type="string" indexed="true" stored="false"/>
+    <field name="birth_place" type="string" indexed="true" stored="true"/>
+    <field name="death_place" type="string" indexed="true" stored="true"/>
+    <field name="country" type="string" indexed="true" stored="true" multiValued="true"/>
+    <field name="related_place" type="string" indexed="true" stored="true" multiValued="true"/>
+    <field name="field_of_activity" type="string" indexed="true" stored="true" multiValued="true"/>
+    <field name="occupation" type="string" indexed="true" stored="true" multiValued="true"/>
+    <field name="gender" type="string" indexed="true" stored="true" multiValued="true"/>
+    <field name="language" type="string" indexed="true" stored="true" multiValued="true"/>
+
     <!-- Tracking fields to keep track of oldest and most recent index times -->
     <field name="first_indexed" type="date" indexed="true" stored="true"/>
     <field name="last_indexed" type="date" indexed="true" stored="true"/>
-- 
GitLab