Reindexing and Search Results

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.

But what does that mean?

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.


Read more by Valerie Burnett

Tags searching, reindex