[OPEN-ILS-DEV] Patron Search - minor enhancement.

Lebbeous Fogle-Weekley lebbeous at esilibrary.com
Thu May 5 12:04:18 EDT 2011


Hi Niles,

I'd like to commit your patch plus Mike Rylander's index suggestion (in 
time for 2.1 beta).   Can you provide a DCO real quick?

See the bottom of http://open-ils.org/dokuwiki/doku.php?id=contributing

Thanks!

Lebbeous

On 05/04/2011 12:44 PM, Niles Ingalls wrote:
> I'd like to submit this patch, which will improve patron phone search results (at least for my purposes).
> This patch will do a match against digits only, when the search method is given a search string that only contains digits.
> Results will be improved in cases situations where number validation is loose, or where you have some legacy records that weren't fully washed.
>
>
>
> /openils/lib/perl5/OpenILS/Application/Storage/Publisher/actor.pm
>
> 666c666,670
> <  			push @ps, "evergreen.lowercase($p) ~ ?";
> ---
>> 			if ($pv =~ /^\d+$/) {
>>                          	push @ps, "evergreen.lowercase(REGEXP_REPLACE($p, '[^0-9]', '', 'g')) ~ ?";
>> 			} else {
>> 				push @ps, "evergreen.lowercase($p) ~ ?";
>> 			}
>
>
>
> Niles Ingalls
> UNIX&  Web Administrator
> Hussey-Mayfield Memorial Public Library
> 250 N. Fifth Street
> P.O. Box 840
> Zionsville, IN. 46077
>
> Phone   317-873-3149 x13280
> Fax     317-873-8339
>
> "Confidence is what you have before you understand the problem." - Woody Allen
>


-- 
Lebbeous


More information about the Open-ils-dev mailing list