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.
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
*** This bug has been marked as a duplicate of bug 29374 ***