In my last post about How to Delete all Bibliographic Records from Koha I explained how to purge only the bibliographic records from a Koha installation while keeping the Users, Settings, and other data intact. I did this by manually deleting the following tabels.
- items
- deleteditems
- biblioitems
- biblio
- deletedbiblioitems
- deletedbiblio
- biblio_metadata
- deletedbiblio_metadata
After expunging the data from these tables in the MySQL database, we need to restart the Memcached service and rebuild the zebra indexes as follows.
sudo service memcached restart
sudo koha-rebuild-zebra -f -v library
In this “library” being the name of my instance, you can replace library with your instance name. Now the records are deleted, and my reports module also shows that there are 0 Biblios and 0 items in the database. But even after restarting the Memcached service and after building the zebra indexes again, I noticed that some old records were still showing in the catalogue search results. Although when I clicked on any of it, it showed an error saying, “The record does not exist.” it is still annoying to see ghosts of purged records lingering in my search results.
So the solution to this problem Is extremely simple and the solution is “Just ignore“.
Yeah! You read that correctly, ignore it and start building your catalogue again. Create a new Biblio entry in the blank database. Once you create a new record, even a single record, and then re-run the zebra indexing command. It would get rid of all the ghosts of old purged records.
Once you create a new record and re-run zebra indexing, it will create a fresh index of the newly created record, and all cached entries will be gone.
Leave a Reply