Summary: | Elasticsearch - don't attempt to index record if it cannot be retrieved | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Searching - Elasticsearch | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P5 - low | CC: | victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: | Bug 26522: Don't index record if no record is retrieved |
Description
Nick Clemens (kidclamp)
2020-09-23 17:57:45 UTC
Created attachment 110614 [details] [review] 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 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 > 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 As well as /var/log/koha/kohadev/plack-intranet-error.log (got confused with the log files) |