[Koha-bugs] [Bug 18131] Matching staged records when using elastic search fails

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 10 15:00:43 CET 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18131

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #62087|0                           |1
        is obsolete|                            |

--- Comment #14 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 69087
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69087&action=edit
Bug 18131: ES - Fix matching staged records

The code in C4::Matches::get_matches is terrible and a bug has been introduced
by bug 12478 because of its way to handle uniqueness.

If search engine is elastic, simple_search_compat returns array ref of
MARC::Record,
used as a string for the key of the matches hashref we get things like
"MARC::Record=HASH(0x8f76ab0)".
Yes, terrible...

The file is never staged and we get an internal server error:
    stage-marc-import.pl: Can't locate object method "fields" via package
"MARC::Record=HASH(0x8f76ab0)" (perhaps you forgot to load
"MARC::Record=HASH(0x8f76ab0)"?) at /home/vagrant/kohaclone/C4/Biblio.pm line
2691

To recreate the issue:
- Set SearchEngine == Elastic
- Create a matching rule on 999$c (you need to edit the existing one and
specify
'Local-number' as search index, not 'local-number')
- Import a file with bibliographic records and use the matching rule you
defined.

Test plan:
Import authority and bibliographic records with Zebra and Elastic using a
matching rule.
Everything should work correctly.

Note: I found a bug when importing authorities using Elastic, see bug 17255
comment 38.

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>

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


More information about the Koha-bugs mailing list