Bug 36226

Summary: Large patron databases create difficult patron auto-complete searches
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, kyle, mspinney
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Laura Escamilla 2024-03-04 20:07:45 UTC
Large library systems or consortium are seeing issues with patron name searches. For example, if staff look for a patron with the name of "John Smith" the autocomplete feature will show the first 10 results of patrons with the name "John Smith" or similar names like "Johnny Smith". However, if they search for a name such as "Mary Maryilyn" the search will not pull up the correct patron. The autocomplete will pull up names with "Mary" or "Maryilyn" but not the name itself. A regular patron search will also result in several pages of results instead of the one unique name.
Comment 1 Kyle M Hall (khall) 2024-03-11 16:31:35 UTC
The problem here is our patron searches are not weighted. We simply gather all patrons that match the search criteria and sort them by firstname and lastname. We need to do weighted searching. We could do something like use Elastic for indexing and searching patron data, or we could do something like https://stackoverflow.com/questions/6496866/best-way-to-do-a-weighted-search-over-multiple-fields-in-mysql
Comment 2 Kyle M Hall (khall) 2024-03-11 17:05:41 UTC
Also https://www.perl.com/pub/2003/09/25/searching.html/