Koha/labels
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
..
label-create-csv.pl Bug 8442 - labels creator fixes for plack 2012-07-24 16:21:05 +02:00
label-create-pdf.pl Bug 8442 - labels creator fixes for plack 2012-07-24 16:21:05 +02:00
label-create-xml.pl Bug 8442 - labels creator fixes for plack 2012-07-24 16:21:05 +02:00
label-edit-batch.pl Bug 10527: remove disused routine C4::Branch::get_branch_code_from_name 2013-07-12 20:20:20 +00:00
label-edit-layout.pl Bug 8490: fix Plack error when creating label layout 2012-11-05 08:35:06 -05:00
label-edit-profile.pl Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
label-edit-template.pl Bug 8315 - remove use C4::* version 2012-07-13 14:17:20 +02:00
label-home.pl Fix FSF address in directory labels/ 2010-03-16 20:17:50 -04:00
label-item-search.pl Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
label-manage.pl Bug 10527: remove disused routine C4::Branch::get_branch_code_from_name 2013-07-12 20:20:20 +00:00
label-print.pl Bug 8943 - Add table sorting to labels - Followup - Sort pulldowns in batch export. 2013-03-31 08:33:42 -04:00
spinelabel-home.pl textual cleanup of new quick spine label code 2009-08-02 11:08:16 -04:00
spinelabel-print.pl Change in API : ordnum becomes ordernumber 2009-10-30 00:30:47 +01:00