[Bug 26522] New: Elasticsearch - don't attempt to index record if it cannot be retrieved
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 Bug ID: 26522 Summary: Elasticsearch - don't attempt to index record if it cannot be retrieved Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com In ModZebra we call GetMarcBiblio - this can fail on malformed records. If it does, we should not attempt to index, otherwsie we get an error: [Wed Sep 23 14:49:59.978945 2020] [cgi:error] [pid 131451] [client 172.18.0.1:46768] AH01215: [Wed Sep 23 14:49:59 2020] manage-marc-import.pl: {UNKNOWN}: Can't call method "leader" on an undefined value at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 566. at /kohadevbox/koha/tools/manage-marc-import.pl line 252: /kohadevbox/koha/tools/manage-marc-import.pl, referer: http://localhost:8081/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 110614 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110614&action=edit Bug 26522: Don't index record if no record is retrieved Currently if we cannot load the marc record, we die. This patch simply skips the malformed record during indexing Eventually we should warn or pass back an exception, but we can use compare_es_to_db.pl to identify problematic records and should fix this issue to prevent import from dying To test: 1 - Export or create a bib with malformed data In sample data search for 'udgave' the record has 942 _6_ 2 - Set System preference SearchEngine to Elasticsearch 3 - Import the record 4 - Import fails 5 - Check intranet-error.log, see warning about calling leader on undefined value 6 - Apply patch 7 - Import again 8 - Success, import succeeds 9 - Search for 'udgave' or term that returns your record 10 - The record should not be findable -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Needs Signoff |Patch doesn't apply --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Applying: Bug 26522: Don't index record if no record is retrieved error: sha1 information is lacking or useless (C4/Biblio.pm). error: could not build fake ancestor Patch failed at 0001 Bug 26522: Don't index record if no record is retrieved -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
4 - Import fails
I was able to stage and import according to the UI:
Number of records added 1
5 - Check intranet-error.log, see warning about calling leader on undefined value
Nothing such in /var/log/koha/kohadev/intranet-error.log As well as /var/log/koha/kohadev/plack-error.log -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> --- As well as /var/log/koha/kohadev/plack-intranet-error.log (got confused with the log files) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26522 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |RESOLVED Resolution|--- |FIXED --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Bug 25265 fixed this I believe -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org