Record Indexing in Koha

Record Indexing in Koha

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.

Why are there barcodes or titles of deleted records in my search results?

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

  1. 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.
  2. 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
    • Related Articles

    • Data Testing in Koha

      The following list helps you check to make sure that your data has migrated properly. Please take the time to thoroughly check your data before you go live. Please note that the test site contains a snapshot of your current ILS when you first did the ...
    • Preparing your Data for ILS Migration to Koha

      Once you have decided to switch to Koha, there are a few steps you can follow during your migration process with us to ensure a successful experience for you, your staff, and your library. What happens first? After you have done the initial data ...
    • Tips for a successful data migration

      During your migration to Koha, diving deep into your data is one of the most crucial aspects of the process, and there are three things we'd like our onboarding partners to keep in mind: First and foremost, think about patron experience. Streamlining ...
    • Koha Glossary of Terms

      Find the basics of Koha's vocabulary here This glossary is in alphabetical order. Use control+F to quickly search this page for specific terms. Authority Record: allows your library to control and search fields in your MARC records such as subject ...
    • Item Types in Koha

      One of the key components of your library's collection will be the Item Type designation. Item types are a way for your patrons to identify what the item is and more importantly to Koha how this item circulates in your library. Here is a link to the ...