[Koha-bugs] [Bug 11096] Koha cannot retreive big records from Zebra

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 6 13:25:43 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11096

--- Comment #19 from Kyle M Hall <kyle at bywatersolutions.com> ---
Created attachment 23336
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23336&action=edit
Bug 11096: force XML syntax for Zconn and remove MARC::File::USMARC everywhere.

This patch makes Koha <-> Zebra exchange speak XML instead of the
current 'USMARC'. For that, it changes some bits in
- C4::Context->Zconn
- C4::Context-_new_Zconn
Zebra's 'element' variable is set to "marcxml" to match our zebra config files.

References to MARC::File::USMARC::decode are substituted for calls to
the correct one [1] (i.e. MARC::Record::new_from_xml using an explicit
'UTF-8' encoding for the task.

This patch also removes calls to the unsafe ZOOM::Record->render()[2] method.
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).

- The FindDuplicates function was MARCXML-ized too.
- Unit tests have been moved to expect MARCXML from Zebra as well.

TODO: relevance still uses USMARC. Need advise on that.

References to MARC::File::USMARC where replaced for the corresponding
MARC::File::XML
counterpart from AuthoritiesMarc.pm.
 - Authorities search should work as usual.
 - Set dontmerge to see AuthoritiesMarc::merge still works.

Regards
To+

[1] As a side effect some encoding problems got fixed in facets and record
details.
   
http://search.cpan.org/~gmcharlt/MARC-XML-1.0.1/lib/MARC/File/XML.pm#decode()
[2] http://search.cpan.org/~mirk/Net-Z3950-ZOOM/lib/ZOOM.pod#render()

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Testing notes on second patch.

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Works as advertised. Passes koha-qa.pl, t, and xt.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list