---- Reported by dbavousett@ptfs.com 2010-03-24 15:23:05 ---- In C4::Members::SearchMember, the system is searching for surnames like "string%" or "% string%". Thus, for a search "steuben", you'll get Steuben, Steubenstein, or Von Steuben, but not "D'Steuben" or "Smith-Steuben". One of our customers would like this to work to find these punctuated names correctly, but merely using LIKE "%string%" is not the answer; in a search for "van", you want to find "Smith-Vandenberg" "Van Smith" or "Vanilla", but not "Sullivan". mysql has the capability of doing REGEXP there, but it is very, very slow, but I found a resource describing a method of using a more-general LIKE, then REGEXPing that, which testing indicates is *much* faster than adding a bunch of LIKEs for all the combinations. Patch coming shortly. ---- Additional Comments From dbavousett@ptfs.com 2010-03-24 16:13:33 ---- Created an attachment Patch as sent to koha-patches ---- Additional Comments From dbavousett@ptfs.com 2010-03-24 16:39:57 ---- Created an attachment Patch minus a typo --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:26 UTC --- This bug was previously known as _bug_ 4340 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4340 Imported an attachment (id=2024) Imported an attachment (id=2025) Actual time not defined. Setting to 0.0 Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one. CC member jwagner@ptfs.com does not have an account here The original submitter of attachment 2024 [details] [review] is unknown. Reassigning to the person who moved it here: chris@bigballofwax.co.nz. The original submitter of attachment 2025 [details] [review] is unknown. Reassigning to the person who moved it here: chris@bigballofwax.co.nz.
Currently the system is successfully returning results for the example here which was failing: A search for "steuben" will return patrons named "Smith-Steuben". However, the system also shows the less desirable behavior described: a search for "van" will return "Sullivan." I'm tempted to mark this bug fixed since a punctuated name can be searched for successfully. Or should the scope of the bug be changed so that we're talking specifically about the refined LIKE search described above?
This patch *works*, but it's a pact with the Devil. Once you get a large number of patrons in the database, it's astonishingly inefficient, and thus slows down searches for patrons in an unacceptable way.
Does that mean we should not even test this patch but find a better way to do it?
Pushed, please test