Bug 30533 - Add exact search option for patrons
Summary: Add exact search option for patrons
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 25495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-13 19:12 UTC by Andrew Fuerste-Henry
Modified: 2024-01-01 10:01 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***