Koha How-To
Koha Question of the Week: How are Koha Search Result Facets Built?
Each Friday, we will bring you a new Koha Question of the Week. We will select real questions that we receive and share the answers with you!
Question: How are Koha Search Result Facets Built?
Answer: In Koha, the facets that populate on the left of search results in the staff client and OPAC get built from the records in those results with a combination of information like branches holdings are available at and shelving locations, but also authors, subjects, places in those results, and series information. Here's a sample of facets generated from a keyword search for "historical romance":
Sometimes those results can be confusing, especially if they don't populate with shelving locations or item types that might be expected in a general keyword search. Those facets are not built off of every possible search result; a system preference, maxRecordsForFacets, determines how many of the first results are consulted to build that facet list in order to use resources efficiently. By default, we tend to set that value at 50 for our partners, meaning that the facets are built based on the first 50 records returned in a search (and may change as results are reordered). For larger multi-branch and consortium partners, we will sometimes raise that number to 100 if needed, and we've found that typically returns enough facets for staff and users to find what they're looking for.
Additional Resources
Monday Minutes : Searching on Staff Client
Read more by Hebah Amin-Headley