From c50b422a1935c60fca9760d609a0e00a8255ee62 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 5 Mar 2013 16:51:51 +0100 Subject: [PATCH] Bug 9256 - Fix search for the packages See the bug for a description of the problem. This patch tries to restore searching for marcflavour != MARC21 as well as allowing instances with different marcflavors to co-exist on the same server. To test: - Do a package install with e.g. the official squeeze-dev packages and create at least two instances, with different marcflavours, e.g.: sudo koha-create --create-db --marcflavor marc21 test1 sudo koha-create --create-db --marcflavor normarc test2 - Run through the web installers for both instances and add a couple of records to each. Wait for the records to be indexed or run indexing manually with sudo koha-rebuild-zebra -f test1 sudo koha-rebuild-zebra -f test2 - Try searching for the records you added. It should work in test1 but not in test2. - Apply the patch and build packages with the build-git-snapshot script - Install the new koha-common package - Create two instances (because of Bug 9754 it is probably best to give the instances different names than the ones you created above, or to do this on a fresh VM or similar) and add records, as described above. Searching should now work equally well for both instances. Please note: Because of Bug 9752 you will have to set marcflavour = NORMARC by hand before you do the searching, if you choose NORMARC as the marc flavour on one of the instances you create. Please note too: I am not confident that this is the perfect solution, so merciless and thorough testing is necessary! ;-) Signed-off-by: Mirko Tietgen Works for me for GRS-1 (package installation out of the box). Could not figure out how to set up DOM indexing and eventually stopped caring about it. Signed-off-by: Katrin Fischer Build packages with the patch and checked that creating instances and search within them works for both MARC21 and NORMARC. All tests and QA script pass. Signed-off-by: Jared Camins-Esakov Signed-off-by: Chris Cormack --- Makefile.PL | 1 - debian/templates/koha-conf-site.xml.in | 48 +++++++++---------- .../marc21-retrieval-info-auth-dom.xml | 22 +++++++++ .../marc21-retrieval-info-auth-grs1.xml | 40 ++++++++++++++++ .../marc21-retrieval-info-bib-dom.xml | 22 +++++++++ .../marc21-retrieval-info-bib-grs1.xml | 40 ++++++++++++++++ .../normarc-retrieval-info-auth-dom.xml | 22 +++++++++ .../normarc-retrieval-info-auth-grs1.xml | 40 ++++++++++++++++ .../normarc-retrieval-info-bib-dom.xml | 22 +++++++++ .../normarc-retrieval-info-bib-grs1.xml | 40 ++++++++++++++++ .../unimarc-retrieval-info-auth-dom.xml | 22 +++++++++ .../unimarc-retrieval-info-auth-grs1.xml | 40 ++++++++++++++++ .../unimarc-retrieval-info-bib-dom.xml | 22 +++++++++ .../unimarc-retrieval-info-bib-grs1.xml | 40 ++++++++++++++++ etc/zebradb/etc/marc21.mar | 2 + etc/zebradb/etc/normarc.mar | 2 + etc/zebradb/etc/unimarc.mar | 2 + etc/zebradb/etc/usmarc.mar | 5 +- .../marc_defs/marc21/authorities/record.abs | 2 +- .../marc_defs/marc21/biblios/record.abs | 2 +- .../marc_defs/normarc/biblios/record.abs | 2 +- .../marc_defs/unimarc/authorities/record.abs | 2 +- .../marc_defs/unimarc/biblios/record.abs | 2 +- 23 files changed, 409 insertions(+), 33 deletions(-) create mode 100644 debian/templates/marc21-retrieval-info-auth-dom.xml create mode 100644 debian/templates/marc21-retrieval-info-auth-grs1.xml create mode 100644 debian/templates/marc21-retrieval-info-bib-dom.xml create mode 100644 debian/templates/marc21-retrieval-info-bib-grs1.xml create mode 100644 debian/templates/normarc-retrieval-info-auth-dom.xml create mode 100644 debian/templates/normarc-retrieval-info-auth-grs1.xml create mode 100644 debian/templates/normarc-retrieval-info-bib-dom.xml create mode 100644 debian/templates/normarc-retrieval-info-bib-grs1.xml create mode 100644 debian/templates/unimarc-retrieval-info-auth-dom.xml create mode 100644 debian/templates/unimarc-retrieval-info-auth-grs1.xml create mode 100644 debian/templates/unimarc-retrieval-info-bib-dom.xml create mode 100644 debian/templates/unimarc-retrieval-info-bib-grs1.xml create mode 100644 etc/zebradb/etc/marc21.mar create mode 100644 etc/zebradb/etc/normarc.mar create mode 100644 etc/zebradb/etc/unimarc.mar diff --git a/Makefile.PL b/Makefile.PL index ca9e4f00dc..e09860ca08 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -508,7 +508,6 @@ my $pl_files = { if ($config{'INSTALL_ZEBRA'} eq "yes") { push @{ $pl_files->{'rewrite-config.PL'} }, ( 'blib/ZEBRA_CONF_DIR/etc/passwd', - 'blib/ZEBRA_CONF_DIR/etc/usmarc.mar', 'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg', 'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.cfg', 'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg', diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index 0858059da9..1f1c521c6e 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -29,47 +29,47 @@ /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg /etc/koha/zebradb/pqf.properties - - + + - + - + - + - + - + - + @@ -104,42 +104,42 @@ /var/lib/koha/__KOHASITE__/authorities /etc/koha/sites/__KOHASITE__/zebra-authorities-dom.cfg /etc/koha/zebradb/pqf.properties - - - + + - + - + - + - + - + @@ -179,47 +179,47 @@ /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg /etc/koha/zebradb/pqf.properties - - + + - + - + - + - + - + - + diff --git a/debian/templates/marc21-retrieval-info-auth-dom.xml b/debian/templates/marc21-retrieval-info-auth-dom.xml new file mode 100644 index 0000000000..7e45f3873c --- /dev/null +++ b/debian/templates/marc21-retrieval-info-auth-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/marc21-retrieval-info-auth-grs1.xml b/debian/templates/marc21-retrieval-info-auth-grs1.xml new file mode 100644 index 0000000000..a50260fc5d --- /dev/null +++ b/debian/templates/marc21-retrieval-info-auth-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/marc21-retrieval-info-bib-dom.xml b/debian/templates/marc21-retrieval-info-bib-dom.xml new file mode 100644 index 0000000000..7e45f3873c --- /dev/null +++ b/debian/templates/marc21-retrieval-info-bib-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/marc21-retrieval-info-bib-grs1.xml b/debian/templates/marc21-retrieval-info-bib-grs1.xml new file mode 100644 index 0000000000..a50260fc5d --- /dev/null +++ b/debian/templates/marc21-retrieval-info-bib-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-auth-dom.xml b/debian/templates/normarc-retrieval-info-auth-dom.xml new file mode 100644 index 0000000000..f723f9aa5a --- /dev/null +++ b/debian/templates/normarc-retrieval-info-auth-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-auth-grs1.xml b/debian/templates/normarc-retrieval-info-auth-grs1.xml new file mode 100644 index 0000000000..4b0742da7c --- /dev/null +++ b/debian/templates/normarc-retrieval-info-auth-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-bib-dom.xml b/debian/templates/normarc-retrieval-info-bib-dom.xml new file mode 100644 index 0000000000..f723f9aa5a --- /dev/null +++ b/debian/templates/normarc-retrieval-info-bib-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-bib-grs1.xml b/debian/templates/normarc-retrieval-info-bib-grs1.xml new file mode 100644 index 0000000000..4b0742da7c --- /dev/null +++ b/debian/templates/normarc-retrieval-info-bib-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-auth-dom.xml b/debian/templates/unimarc-retrieval-info-auth-dom.xml new file mode 100644 index 0000000000..941f8e8c1c --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-auth-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-auth-grs1.xml b/debian/templates/unimarc-retrieval-info-auth-grs1.xml new file mode 100644 index 0000000000..df703a81d5 --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-auth-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-bib-dom.xml b/debian/templates/unimarc-retrieval-info-bib-dom.xml new file mode 100644 index 0000000000..941f8e8c1c --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-bib-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-bib-grs1.xml b/debian/templates/unimarc-retrieval-info-bib-grs1.xml new file mode 100644 index 0000000000..df703a81d5 --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-bib-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/zebradb/etc/marc21.mar b/etc/zebradb/etc/marc21.mar new file mode 100644 index 0000000000..2e1abe3909 --- /dev/null +++ b/etc/zebradb/etc/marc21.mar @@ -0,0 +1,2 @@ +name marc21 +reference marc21 diff --git a/etc/zebradb/etc/normarc.mar b/etc/zebradb/etc/normarc.mar new file mode 100644 index 0000000000..fe470c3a69 --- /dev/null +++ b/etc/zebradb/etc/normarc.mar @@ -0,0 +1,2 @@ +name normarc +reference normarc diff --git a/etc/zebradb/etc/unimarc.mar b/etc/zebradb/etc/unimarc.mar new file mode 100644 index 0000000000..cf905d124a --- /dev/null +++ b/etc/zebradb/etc/unimarc.mar @@ -0,0 +1,2 @@ +name unimarc +reference unimarc diff --git a/etc/zebradb/etc/usmarc.mar b/etc/zebradb/etc/usmarc.mar index a977ae5756..348c9a19a2 100644 --- a/etc/zebradb/etc/usmarc.mar +++ b/etc/zebradb/etc/usmarc.mar @@ -1,3 +1,2 @@ -# $Id: usmarc.mar,v 1.1 2002/10/22 12:51:09 adam Exp $ -name __ZEBRA_MARC_FORMAT__ -reference __ZEBRA_MARC_FORMAT__ +name usmarc +reference USmarc diff --git a/etc/zebradb/marc_defs/marc21/authorities/record.abs b/etc/zebradb/marc_defs/marc21/authorities/record.abs index f185887e0f..0e0d4514e0 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/record.abs +++ b/etc/zebradb/marc_defs/marc21/authorities/record.abs @@ -14,7 +14,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc marc21.mar systag sysno rank xpath enable diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs index 0f8360eae2..5ff08f49f5 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -21,7 +21,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc marc21.mar systag sysno rank xpath enable # Some notes: diff --git a/etc/zebradb/marc_defs/normarc/biblios/record.abs b/etc/zebradb/marc_defs/normarc/biblios/record.abs index 97d5334c38..596ed3f628 100644 --- a/etc/zebradb/marc_defs/normarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/normarc/biblios/record.abs @@ -35,7 +35,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc normarc.mar systag sysno rank xpath enable # Some notes: diff --git a/etc/zebradb/marc_defs/unimarc/authorities/record.abs b/etc/zebradb/marc_defs/unimarc/authorities/record.abs index c6ed01ffd1..5c992a86da 100644 --- a/etc/zebradb/marc_defs/unimarc/authorities/record.abs +++ b/etc/zebradb/marc_defs/unimarc/authorities/record.abs @@ -6,7 +6,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc unimarc.mar systag sysno rank xpath enable diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index 44a5bbe013..dd481b66ea 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -16,7 +16,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc unimarc.mar systag sysno rank xpath disable -- 2.39.5