Summary: | Prevent search errors if deleted record still remains in search indexes | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall <kyle> |
Component: | Architecture, internals, and plumbing | Assignee: | Kyle M Hall <kyle> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | nick, wizzyrea |
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: | ||
Attachments: | Bug 30386: Prevent search errors if deleted record still remains in search indexes |
Description
Kyle M Hall
2022-03-28 14:57:51 UTC
Created attachment 132349 [details] [review] Bug 30386: Prevent search errors if deleted record still remains in search indexes If a bib is deleted, but for some reason doesn't get deleted from the search indexes, any search where that record is a result will produce the error: Can't call method "items" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 2064. Test Plan: 1) Enable item-level_itypes 2) Create 3 records in Koha that share a word 3) Search for that word, note your 3+ results 4) Delete one of those recordst from the database using koha-mysql 5) Search for the word again 6) Note the error! 7) Apply this patch 8) Search for the word again 9) Note you get results! I could not reproduce this error. I also tried this test plan: 1) Enable item-level_itypes 2) Create 3 records in Koha that share a word 3) Ran koha-rebuild-zebra 4) Search for that word, note your 3+ results 5) Ran koha-indexer --stop kohadev 6) delete from biblio where biblionumber = XXX; 7) Searched again, deleted record still returned along with the others. This is for elastic search, I believe, not zebra. Cheers, Liz |