Bug 30533

Summary: Add exact search option for patrons
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: emmi.takkinen, gmcharlt, kati.sillgren, kebliss, kyle.m.hall, lmstrand
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17500
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Andrew Fuerste-Henry 2022-04-13 19:12:40 UTC
A patron search for names like "JOHN JOHNSON" ends up getting parsed something like "WHERE surname like "%JOHN%" OR firstname like "%JOHN%" OR surname like "%JOHNSON%" OR firstname like "%JOHNSON%"" and finds a really unhelpfully large pile of patrons.

Bug 17500 suggests implementing Elastic for patron searching, which would be great.

In the meantime, we could give a little help for searches like this by giving an exact search option -- so the query would parse more or less the same but without the wildcards. That's also a problematic search for many situations, but would work better here.
Comment 1 Katie Bliss 2023-09-27 20:40:44 UTC
+1 I would love this.
Comment 2 Kati Sillgren 2023-11-14 09:08:36 UTC
This would be very useful!
Comment 3 Lari Strand 2023-11-15 08:19:52 UTC
Maybe the search could be "exact" by default. If only one partial match was found, the partial match should not be viewed directly in moremember.pl, but in a list view as they would if more than one match was found (members-home.pl search result list view). The list view could be clearly stating "Only partial matches found:" to underline the fact than no exact hits were found if there was just one or more than one partial hit. Just the functionality to not take the user to a partial match's detail page would result in less errors when finding patrons with similar names.
Comment 4 Katrin Fischer 2023-11-15 09:09:51 UTC
Having an exact search option would be helpful for big databases, but I am not sure making it the default will work well.

Ideally maybe we could "rank" exact results higher or leave the choice for default to the library. Names are handled differently in countries, often being composed from multiple parts, so search behavior might vary quite a bit.
Comment 5 Katrin Fischer 2024-01-01 10:01:07 UTC
*** Bug 25495 has been marked as a duplicate of this bug. ***