From f15e34fd684bbf55304243c45b2e3b251e34b6e5 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Tue, 17 Jul 2012 07:46:54 -0400 Subject: [PATCH] Bug 7419: correct LCCN/see from indexing This patch adds indexes for previous headings and LCCN for MARC21 authority records. See the following patch for a test plan to confirm that the indexing works correctly. --- C4/AuthoritiesMarc.pm | 3 + etc/searchengine/queryparser.yaml | 11 ++ .../authorities/authority-koha-indexdefs.xml | 28 +++- .../authorities/authority-zebra-indexdefs.xsl | 170 +++++++++++++++++++- 4 files changed, 207 insertions(+), 5 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 9ea3b2d..1b53d31 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -161,6 +161,9 @@ sub SearchAuthorities { elsif ( @$tags[$i] eq "thesaurus" ) { $attr = " \@attr 1=Subject-heading-thesaurus "; } + elsif ( @$tags[$i] eq "previous-only" ) { + $attr = " \@attr 1=Previous-heading-see-from "; + } else { # Assume any if no index was specified $attr = " \@attr 1=Any "; } diff --git a/etc/searchengine/queryparser.yaml b/etc/searchengine/queryparser.yaml index 0cce85c..eddb5ae 100644 --- a/etc/searchengine/queryparser.yaml +++ b/etc/searchengine/queryparser.yaml @@ -658,6 +658,8 @@ field_mappings: bib1_mapping: biblioserver: 1: 9 + authorityserver: + 1: LC-card-number enabled: 1 index: lc-card-number aliases: @@ -834,6 +836,15 @@ field_mappings: aliases: - popularity label: Popularity + previous-only: + bib1_mapping: + authorityserver: + 1: Previous-heading-see-from + enabled: 1 + index: previous-only + aliases: + - prev-see-from + label: Previous-heading-see-from price: bib1_mapping: biblioserver: diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml index 752cd57..c3b1a78 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml @@ -60,7 +60,6 @@ authority-zebra-indexdefs.xsl` Record-source:p - Personal-name:w @@ -101,6 +100,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Personal-name-see-also-from:w @@ -154,6 +156,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Corporate-name-see-also-from:w @@ -207,6 +212,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Meeting-name-see-also-from:w @@ -260,6 +268,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Title-uniform-see-also-from:w @@ -313,6 +324,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Chronological-term-see-also-from:w @@ -361,15 +375,15 @@ authority-zebra-indexdefs.xsl` See-from:p See-from:s - - Previous-heading-see-from:p - Match:w Match:p Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Subject-topical-see-also-from:w @@ -423,6 +437,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Name-geographic-see-also-from:w @@ -476,6 +493,9 @@ authority-zebra-indexdefs.xsl` Match-heading-see-from:p Match-heading-see-from:s + + Previous-heading-see-from:p + Term-genre-form-see-also-from:w diff --git a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl index 1a9257b..426ac1b 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl @@ -1122,8 +1122,128 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + - + @@ -1146,6 +1266,54 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + -- 1.7.9.5