Koha/catalogue
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
..
cardview.pl Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
detail.pl Bug 9823: QA follow-up for GetReservesFromBiblionumber calls 2014-01-30 16:23:34 +00:00
export.pl Bug 9665: QA follow up fixing tabs 2013-06-17 11:25:40 -07:00
getitem-ajax.pl Bug 7175: Allow to choose which items to receive 2012-05-21 17:46:07 +02:00
image.pl Bug 8255: allow local cover images to be cached 2012-06-25 18:12:29 +02:00
imageviewer.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
ISBDdetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
issuehistory.pl Bug 10868 - Use new DataTables include in catalog templates 2013-09-21 19:27:08 +00:00
labeledMARCdetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
MARCdetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
moredetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
search.pl Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
showmarc.pl Bug 11329: Check for MARC record existence in catalogue/showmarc 2014-01-17 15:27:39 +00:00
updateitem.pl Bug 7639: add option to forgive overdue fines when declaring items lost 2013-09-17 15:10:46 +00:00