From 9156344fe68ce8c6b84d4ed233d0e218f0b19cbd Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 23 Oct 2006 09:24:36 +0000 Subject: [PATCH] always do substring & fuzzy, getting complains searches are not returning enough --- FS/FS/cust_main.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 983c469e7..153fc63e1 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4015,10 +4015,10 @@ sub fuzzy_search { Accepts the following options: I, the string to search for. The string will be searched for as a customer number, phone number, name or company name, -first searching for an exact match then fuzzy and substring matches (in some -cases - see the source code for the exact heuristics used). +as an exact, or, in some cases, a substring or fuzzy match (see the source code +for the exact heuristics used). -Any additional options treated as an additional qualifier on the search +Any additional options are treated as an additional qualifier on the search (i.e. I). Returns a (possibly empty) array of FS::cust_main objects. @@ -4168,7 +4168,9 @@ sub smart_search { 'extra_sql' => "$sql AND $agentnums_sql", #agent virtualization } ); - unless ( @cust_main ) { #no exact match, trying substring/fuzzy + #always do substring & fuzzy, + #getting complains searches are not returning enough + #unless ( @cust_main ) { #no exact match, trying substring/fuzzy #still some false laziness w/ search/cust_main.cgi @@ -4229,7 +4231,7 @@ sub smart_search { FS::cust_main->fuzzy_search( { $field => $value }, @fuzopts ); } - } + #} #eliminate duplicates my %saw = (); -- 2.11.0