From 49788987b29f14884a59d41602c7821fec03e491 Mon Sep 17 00:00:00 2001 From: Mathieu Saby Date: Wed, 20 Aug 2014 16:24:49 +0200 Subject: [PATCH] Bug 9828 : Followup for Queryparser and deletion of useless 6XX$9 This followup - changes some indexes in Queryparser configuration file - supresses some clearly useless 6XX$9 in biblio-koha-indexdefs.xml and adds 2 new ones, probably useless (not sure of that) - change the name of index Subject-geographical to Subject-name-geographical in ccl.properties (to match bib1.att) the xsl file zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl was generated with the following command: xsltproc zebradb/xsl/koha-indexdefs-to-zebra.xsl zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml > zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl To test : 1) Apply the 3 patches 2) copy the modified files from the source directory to the directory where you store the config files for Zebra and Queryparser The files modified by the 3 patches and that need to be copied are: etc/zebradb/biblios/etc/bib1.att etc/zebradb/ccl.properties etc/searchengine/queryparser.yaml etc/zebradb/ccl.properties .../unimarc/biblios/biblio-koha-indexdefs.xml .../unimarc/biblios/biblio-zebra-indexdefs.xsl 3) Rebuild Zebra 4) Create a record A with some values in critical fields, for example: - the string "test9828" in 600$c 600$f 600$p, 602$f, 616$c, 616$f, 606$2,600$2 - the string "subform" in 600$j 4) Create a record B with the string "subgeo" in 606$y 5) Create a record C with the string "subdate" in 606$z WITHOUT QP activated in sysprefs ("Don't try to use QP"): 6) try to search "su:test9828". You should have no results 7) try to search "su-genre:subform". You should have 1 result : record A 8) try to search "su-geo:subgeo". You should have 1 result : record B 9) try to search "su-chrono:subdate". You should have 1 result : record C 10) on existing records, try su-ut, su-to, su-na, su-form, su-corp, su-geo indexes, and see it results are relevant WITH QP activated in sysprefs: Same tests Signed-off-by: Nick Clemens Signed-off-by: Paul Poulain Signed-off-by: Tomas Cohen Arazi --- etc/searchengine/queryparser.yaml | 105 +++++++++++++++--- etc/zebradb/ccl.properties | 6 +- .../unimarc/biblios/biblio-koha-indexdefs.xml | 38 +------ .../biblios/biblio-zebra-indexdefs.xsl | 66 +---------- 4 files changed, 103 insertions(+), 112 deletions(-) diff --git a/etc/searchengine/queryparser.yaml b/etc/searchengine/queryparser.yaml index d9f637bfd3..717df1ea48 100644 --- a/etc/searchengine/queryparser.yaml +++ b/etc/searchengine/queryparser.yaml @@ -1196,9 +1196,7 @@ field_mappings: label: '' aliases: - su - - su-to - - su-geo - - su-ut + authority-number: authority-number: bib1_mapping: biblioserver: @@ -1270,16 +1268,6 @@ field_mappings: aliases: - matchheading - match-heading - name-personal: - bib1_mapping: - biblioserver: - 1: 1009 - enabled: 1 - index: name-personal - label: Name-personal - aliases: - - name-personal - - su-na index-term-genre: bib1_mapping: biblioserver: @@ -1321,6 +1309,97 @@ field_mappings: label: Start aliases: - start + subject-chronological: + bib1_mapping: + biblioserver: + 1: 1077 + enabled: 1 + index: subject-chronological + label: Subject-chronological + aliases: + - subject-chronological + - su-chrono + subject-division: + bib1_mapping: + biblioserver: + 1: 47 + enabled: 1 + index: subject-division + label: Subject-division + aliases: + - subject-division + subject-genre-form: + bib1_mapping: + biblioserver: + 1: 1075 + enabled: 1 + index: subject-genre-form + label: Subject-genre-form + aliases: + - subject-genre-form + - su-genre + - su-form + subject-name-conference: + bib1_mapping: + biblioserver: + 1: 1073 + enabled: 1 + index: subject-name-conference + label: Subject-name-conference + aliases: + - subject-name-conference + - su-conf + subject-name-corporate: + bib1_mapping: + biblioserver: + 1: 1074 + enabled: 1 + index: subject-name-corporate + label: Subject-name-corporate + aliases: + - subject-name-corporate + - su-corp + subject-name-geographical: + bib1_mapping: + biblioserver: + 1: 1076 + enabled: 1 + index: subject-name-geographical + label: Subject-name-geographical + aliases: + - subject-name-geographical + - su-geo + subject-name-personal: + bib1_mapping: + biblioserver: + 1: 1009 + enabled: 1 + index: subject-name-personal + label: Subject-name-personal + aliases: + - subject-name-personal + - su-na + subject-title: + bib1_mapping: + biblioserver: + 1: 1078 + enabled: 1 + index: subject-title + label: Subject-title + aliases: + - subject-title + - su-ti + - su-ut + subject-topical: + bib1_mapping: + biblioserver: + 1: 1079 + enabled: 1 + index: subject-topical + label: Subject-topical + aliases: + - subject-topical + - su-to title: title: bib1_mapping: diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 85611d3562..f0c09347bb 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -739,10 +739,10 @@ Subject-genre-form 1=1075 su-genre Subject-genre-form su-form Subject-genre-form -#Subject-geographical 1076 MARC21 651 ; UNIMARC 607 +#Subject-name-geographical 1076 MARC21 651 ; UNIMARC 607 # MARC21 AND UNIMARC 6XX$y -Subject-geographical 1=1076 -su-geo Subject-geographical +Subject-name-geographical 1=1076 +su-geo Subject-name-geographical #Subject-chronological 1077 MARC21 and UNIMARC 6XX$z Subject-chronological 1=1077 diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml index 85f50f8626..55462c1e97 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml @@ -1232,43 +1232,13 @@ Koha-Auth-Number:w Koha-Auth-Number:n - - + + Koha-Auth-Number:w Koha-Auth-Number:n - - - Koha-Auth-Number:w - Koha-Auth-Number:n - - - - Koha-Auth-Number:w - Koha-Auth-Number:n - - - - Koha-Auth-Number:w - Koha-Auth-Number:n - - - - Koha-Auth-Number:w - Koha-Auth-Number:n - - - - Koha-Auth-Number:w - Koha-Auth-Number:n - - - - Koha-Auth-Number:w - Koha-Auth-Number:n - - - + + Koha-Auth-Number:w Koha-Auth-Number:n diff --git a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl index ef2ff9e3d1..9de15be82a 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl +++ b/etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl @@ -2138,52 +2138,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -2191,17 +2146,15 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - - - + + - + @@ -2209,17 +2162,6 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - - - - - - - - - - -- 2.39.5