Search Patrons - Make patron search more forgiving.
Patron search has only been searching fields for names that either match or begin with the given search terms. This is too strict a search. For example, take the name "Billie Jo Robinson", "Billie Jo" being the firstname, and "Robinson" being the last name. If one were to search for "Billie Jo", this patron would not appear in the search results. To remedy this, the search type has been changed from 'begins_with' to 'contain'. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
9a989c9e58
commit
db8bda86ea
|
|
@ -94,7 +94,7 @@ push @searchpatron, $patron if (keys %$patron);
|
|||
my $from= ($startfrom-1)*$resultsperpage;
|
||||
my $to=$from+$resultsperpage;
|
||||
#($results)=Search(\@searchpatron,{surname=>1,firstname=>1},[$from,$to],undef,["firstname","surname","email","othernames"] ) if (@searchpatron);
|
||||
my $search_scope=($quicksearch?"field_start_with":"start_with");
|
||||
my $search_scope=($quicksearch?"field_start_with":"contain");
|
||||
($results)=Search(\@searchpatron,\@orderby,undef,undef,["firstname","surname","email","othernames","cardnumber","userid"],$search_scope ) if (@searchpatron);
|
||||
if ($results){
|
||||
$count =scalar(@$results);
|
||||
|
|
|
|||
Loading…
Reference in New Issue