projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d5aaf28
)
always do substring & fuzzy, getting complains searches are not returning enough
author
ivan
<ivan>
Mon, 23 Oct 2006 09:24:36 +0000
(09:24 +0000)
committer
ivan
<ivan>
Mon, 23 Oct 2006 09:24:36 +0000
(09:24 +0000)
FS/FS/cust_main.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
983c469
..
153fc63
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-4015,10
+4015,10
@@
sub fuzzy_search {
Accepts the following options: I<search>, the string to search for. The string
will be searched for as a customer number, phone number, name or company name,
Accepts the following options: I<search>, 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 som
e
-
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 cod
e
+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<agentnum>).
Returns a (possibly empty) array of FS::cust_main objects.
(i.e. I<agentnum>).
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
} );
'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
#still some false laziness w/ search/cust_main.cgi
@@
-4229,7
+4231,7
@@
sub smart_search {
FS::cust_main->fuzzy_search( { $field => $value }, @fuzopts );
}
FS::cust_main->fuzzy_search( { $field => $value }, @fuzopts );
}
- }
+
#
}
#eliminate duplicates
my %saw = ();
#eliminate duplicates
my %saw = ();