https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18131
Bug ID: 18131 Summary: Matching staged records when using elastic search fails Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: gmcha...@gmail.com Reporter: stefan.berndts...@ub.gu.se QA Contact: testo...@bugs.koha-community.org CC: m.de.r...@rijksmuseum.nl There is a perl related bug in C4/Matcher.pm when collecting matched records. "simple_search_compat" returns a reference to an array of matches. When using ElasticSearch, this array contains MARC::Record objects. The score for these matches are then collected (currently line 692-694) into a hash "%matches" where the matched object is used as the key. Perl converts all hash keys into strings, so the object is lost. The hash "%matches" is used in a foreach (line 708) where it assumes the object can be recovered from the key, but this is not the case. The error in the log is: stage-marc-import.pl: Can't locate object method "fields" via package "MARC::Record=HASH(0xb403da8)" (perhaps you forgot to load "MARC::Record=HASH(0xb403da8)"?) at /home/vagrant/kohaclone/C4/Biblio.pm line 2691., referer: http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl Steps to reproduce (given an instance using ElasticSearch as search engine): 1. Export a bibliographic record in MARC format. 2. Create a matching rule that matches on "999$c" with a score and threshold of 1000 (doesn't really matter as long as they're the same) 3. Edit the record in Koha so that they're slightly different (this is probably unnecessary). 4. Upload the exported file in Stage MARC import, and select the matching rule you created, then click on "Stage for import". Expected outcome: Redirected to the batch page with the matching record being shown. Actual outcome: Things seem to hang, but in reality the staging has crashed with the error shown above. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/