Koha relies on indexes for search, which also makes a search much faster. Koha uses an indexer to update the index when changes are made to the catalog. Sometimes things go awry or do not happen as quickly as expected. Here are some scenarios and answers.
Scenario: You just deleted a bib, but then when you search, it’s still there! But then you click on it, and it’s gone! But you search for it again, and it’s still there! But it’s gone!
Scenario: You asked ByWater to update 1000 call numbers for you. They did it, but then you search, and you see the old call numbers. If you actually click into the record, you see the new call number.
Scenario: You added several new records to the catalogue. You can see them from the acquisition screen, but you can’t find them when you search.
Diagnosis: Your search indexes are not current.
Indexes are not current
Koha’s search index is very analogous to the index of a book. When you need to find something in the book, it would take way too long to scan page by page, so you turn to the index, which tells you exactly where to find it. Similarly, Koha doesn’t search your entire catalogue, record by record. That would take too long and too much processing power. So Koha creates an index, and when you search, Koha is looking at the index it made. The search results you see on the screen are like the pages of an index, with a preview taken from the search index.
Now imagine you tear the page about cats out of your book. The index remains the same, so if you look up cats in the index, you’ll see it in the index, but when you turn to the page, it’s gone. You’d need to update the book’s index to reflect the changes you made.
Similarly, Koha needs to update the index to reflect changes. And usually it’s really good at it. You make changes, it updates the index, and the search reflects the new changes. But occasionally, something gets stuck along the way, and the index doesn’t update as fast as it should. That’s when you see discrepancies. Your search results are showing you reality the way it was before, not what is currently true.
What can libraries do?
You can force a reindex of an individual record, simply by editing/saving the record, no changes required. The act of saving the record will update the index. So in the scenario above, when the call numbers were changed, but the search results don’t reflect the change, you could edit/save an individual record, and then it should be updated in the index and in search results.
What can ByWater do to help you?
If there’s lots of changes made, ByWater will run a reindex overnight. Except in the case of dire search emergencies, ByWater reindexes during non-busy times, to avoid any possible disruption to regular services. If it’s just a few records, ByWater will probably reindex them for you manually, individually, making the changes immediate.
When should you ask ByWater for help?
If the changes were just made, give the database a little time to catch up. Allow it an hour or two to finish processing the changes in the background, maybe even give it overnight. If it’s been overnight and the changes still aren’t reflected in your search results, definitely reach out for assistance.
Don't worry, these ghostly hauntings are not dangerous and usually go away with time.
When you search in Koha, it is analogous to searching in a book. You don't flip through the whole book looking for your topic, you open right to the index and find the topic and a link to its location.
Similarly, Koha maintains an index of its database contents. When you perform a search, Koha is looking at its index, rather than the full database. Now and then, the index gets behind. The reindexer got stuck, or sad, or behind. When this happens, you might find deleted records still searchable, or you might not be able to search for newly added records.
Options
- If a newly added record is not showing up when you search, simply edit/save the record, no changes necessary. This forces the record to be indexed and thus searchable.
- Give it time. Wait overnight, and if the index still isn't updated, reach out to us at ByWater about the mismatch. ByWater experts will either apply ghostbusting, to remove lingering ghosts, or run a reindex to rebuild Koha’s index accurately