Koha/cataloguing
Tomas Cohen Arazi daf2ebc4f5 Bug 11096: support the retrieval of large MARCXML records
This patch makes Koha <-> Zebra use MARCXML for the serialization when
using DOM, and USMARC for GRS-1.

* The following functions are modified to set the Zebra record syntax
according to the current sysprefs and configuration:

- C4::Context->Zconn
- C4::Context-_new_Zconn

* A new function 'new_record_from_zebra' is introduced, which checks the
context we are in, and creates the MARC::Record object using the right
constructor.

The following packages get touched to make use of the new function:
- C4::Search
- C4::AuthoritiesMarc

and the same happens to the UI scripts that make use of them (both in
the OPAC and STAFF interfaces).

* Calls to the unsafe ZOOM::Record->render()[1] method are removed.

Due to this last change the code for building facets was rewritten. And
for performance on the facets creation I pushed higher version
dependencies for MARC::File::XML and MARC::Record (we rely on
MARC::Field->as_string).

* Calls to MARC::Record->new_from_xml and MARC::Record->new_from_usmarc
are wrapped with eval for catching problems [2].

* As of bug 3087, UNIMARC uses the 'unimarc' record syntax. this case is
  correctly handled.
* As of bug 7818 misc/migration_tools/rebuild_zebra.pl behaves like:

- bib_index_mode (defaults to 'grs1' if not specified)
- auth_index_mode (defaults to 'dom')

here we do exactly the same.

To test:
 - prove t/db_dependent/Search.t should pass.
 - Searching should remain functional.
 - Indexing and searching for a big record should work (that's what the
   unit tests do).
 - Test an index scan search (on the staff interface):
    Search > More options > Check "Scan indexes".
 - Enable 'itemBarcodeFallbackSearch' and try to circulate any word, it
   shouldn't break.
 - Searching for a biblio in a new subscription shouldn't break.
 - Running bulkmarcimport.pl shouldn't break.
 - And so on... for the rest of the .pl files.

[1] http://search.cpan.org/~mirk/Net-Z3950-ZOOM/lib/ZOOM.pod#render()
[2] a record that cannot be parsed by MARC::Record is simply skipped (bug 10684)

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-28 19:50:09 +00:00
..
value_builder Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
addbiblio.pl Bug 11313: supply empty value in mandatory comboboxs in MARC record editors 2014-01-23 03:47:38 +00:00
addbooks.pl Bug 11410: ensure cataloging search finds results for searches with ampersands 2013-12-21 00:33:09 +00:00
additem.pl Bug 7002: fix some invalid superlibrarian permission checks 2014-01-06 05:32:22 +00:00
linkitem.pl Bug 5528: Analytic records support 2011-10-13 10:03:39 +13:00
merge.pl Bug 9755 QA follow-up: move MARC-specific functionality to utility class 2013-07-23 23:10:21 +00:00
merge_ajax.pl Bug 8860 - can't merge if you don't have fast cataloging permissions 2012-10-05 16:51:32 +02:00
moveitem.pl Bug 10504: Remove the unused C4::Acq::ModOrderItem routine 2013-07-15 16:06:19 +00:00
plugin_launcher.pl Bug 7356 - Fix various typos and mis-spellings 2012-01-13 11:51:26 +01:00
ysearch.pl Bug 8278: build the structure with to_json instead of manually. 2013-05-08 09:49:55 -04:00
z3950_auth_search.pl Bug 10096 - (follow-up) various QA improvements 2013-10-04 14:29:18 +00:00
z3950_search.pl Bug 10096 - Add a Z39.50 interface for authority searching 2013-10-04 14:26:29 +00:00