Koha/cataloguing/value_builder
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
..
barcode.pl Bug 8524: Followup FIX an undeclared variable $query 2012-08-31 17:42:46 +02:00
barcode_manual.pl Bug 8524 follow-up: fix Javascript syntax error 2012-08-31 17:42:48 +02:00
callnumber-KU.pl Bug 9773 - Replace YUI AJAX calls in cataloging plugins with jQuery 2013-05-29 08:30:32 -07:00
callnumber.pl Bug 9773 - Replace YUI AJAX calls in cataloging plugins with jQuery 2013-05-29 08:30:32 -07:00
dateaccessioned.pl Bug 6125: repairs dateaccessioned plugin 2012-03-22 16:18:38 +01:00
labs_theses.pl
macles.pl Bug 6679 : Tidying changed parts of file 2011-11-06 18:19:19 +01:00
marc21_field_003.pl
marc21_field_005.pl
marc21_field_006.pl Bug 10592: fix MARC21 006/008 cataloging plugins 2013-07-22 14:00:23 +00:00
marc21_field_007.pl Bug 10715 - MARC21 007 Plugin Editor doesn't load position 01 2013-08-16 14:13:59 +00:00
marc21_field_008.pl Bug 10592: fix MARC21 006/008 cataloging plugins 2013-07-22 14:00:23 +00:00
marc21_field_008_authorities.pl 8627 Followup for removing tabs 2012-09-18 12:29:37 +02:00
marc21_field_040c.pl
marc21_field_040d.pl
marc21_field_245h.pl
marc21_leader.pl
marc21_leader_authorities.pl
marc21_leader_book.pl
marc21_leader_computerfile.pl
marc21_leader_video.pl
marc21_linking_section.pl Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
normarc_field_007.pl
normarc_field_008.pl Bug 7055 - NORMARC: Fix 008 position 15-17 and 35-37 2013-05-01 07:45:21 -04:00
normarc_leader.pl Bug 7054 - NORMARC: Fix default for 000 position 17 2013-05-01 07:47:52 -04:00
stocknumber.pl Bug 6679: fix missing use strict 2011-12-09 09:49:22 +01:00
stocknumberam123.pl Bug 9773 - Replace YUI AJAX calls in cataloging plugins with jQuery 2013-05-29 08:30:32 -07:00
stocknumberAV.pl Bug 7992: New plugin stocknumberAV 2012-10-02 17:19:55 +02:00
unimarc_field_4XX.pl Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
unimarc_field_010.pl Bug 9773 - Replace YUI AJAX calls in cataloging plugins with jQuery 2013-05-29 08:30:32 -07:00
unimarc_field_100.pl Bug 8347 - Koha forces UNIMARC 100 field code language to 'fre' 2013-02-20 09:06:09 -05:00
unimarc_field_100_authorities.pl Bug 8334 - Authority UNIMARC 100 field plugin 2013-12-13 16:31:16 +00:00
unimarc_field_105.pl
unimarc_field_106.pl
unimarc_field_110.pl
unimarc_field_115a.pl
unimarc_field_115b.pl
unimarc_field_116.pl
unimarc_field_117.pl
unimarc_field_120.pl
unimarc_field_121a.pl
unimarc_field_121b.pl
unimarc_field_122.pl
unimarc_field_123a.pl
unimarc_field_123d.pl
unimarc_field_123e.pl
unimarc_field_123f.pl
unimarc_field_123g.pl
unimarc_field_123i.pl
unimarc_field_123j.pl
unimarc_field_124.pl
unimarc_field_124a.pl
unimarc_field_124b.pl
unimarc_field_124c.pl
unimarc_field_124d.pl
unimarc_field_124e.pl
unimarc_field_124f.pl
unimarc_field_124g.pl
unimarc_field_125.pl
unimarc_field_125a.pl
unimarc_field_125b.pl
unimarc_field_126.pl
unimarc_field_126a.pl
unimarc_field_126b.pl
unimarc_field_127.pl
unimarc_field_128a.pl
unimarc_field_128b.pl
unimarc_field_128c.pl
unimarc_field_130.pl
unimarc_field_135a.pl
unimarc_field_140.pl
unimarc_field_141.pl
unimarc_field_210c.pl Bug 6679: fix missing use strict 2011-12-09 09:49:22 +01:00
unimarc_field_210c_bis.pl
unimarc_field_225a.pl
unimarc_field_686a.pl
unimarc_field_700-4.pl
unimarc_leader.pl