&searchResults
&getRecords
&buildQuery
- &AddSearchHistory
&GetDistinctValues
&enabled_staff_search_views
&PurgeSearchHistory
## Check if it's an index scan
if ($scan) {
- my ( $term, $occ ) = $results[ $i - 1 ]->term($j);
+ my ( $term, $occ ) = $results[ $i - 1 ]->display_term($j);
# here we create a minimal MARC record and hand it off to the
# template just like a normal result ... perhaps not ideal, but
"Title-cover,ext,r1=\"$operand\""; # exact title-cover
$weighted_query .= " or ti,ext,r2=\"$operand\""; # exact title
$weighted_query .= " or Title-cover,phr,r3=\"$operand\""; # phrase title
+ $weighted_query .= " or ti,wrdl,r4=\"$operand\""; # words in title
#$weighted_query .= " or any,ext,r4=$operand"; # exact any
#$weighted_query .=" or kw,wrdl,r5=\"$operand\""; # word list any
$weighted_query .= " or wrdl,fuzzy,r8=\"$operand\""
'Corporate-name-seealso',
'Country-publication',
'ctype',
+ 'curriculum',
'date-entered-on-file',
'Date-of-acquisition',
'Date-of-publication',
'Host-item',
'id-other',
'Illustration-code',
+ 'Index-term-genre',
+ 'Index-term-uncontrolled',
'ISBN',
'isbn',
'ISSN',
'lc-card',
'LC-card-number',
'lcn',
+ 'lex',
'llength',
'ln',
+ 'ln-audio',
+ 'ln-subtitle',
'Local-classification',
'Local-number',
'Match-heading',
$group_OR_limits{$k} .= " or " if $group_OR_limits{$k};
$limit_desc .= " or " if $group_OR_limits{$k};
$group_OR_limits{$k} .= "$this_limit";
- $limit_cgi .= "&limit=$this_limit";
+ $limit_cgi .= "&limit=" . uri_escape($this_limit);
$limit_desc .= " $this_limit";
}
else {
$limit .= " and " if $limit || $query;
$limit .= "$this_limit";
- $limit_cgi .= "&limit=$this_limit";
+ $limit_cgi .= "&limit=" . uri_escape($this_limit);
if ($this_limit =~ /^branch:(.+)/) {
my $branchcode = $1;
my $branchname = GetBranchName($branchcode);
);
}
-sub AddSearchHistory{
- my ($borrowernumber,$session,$query_desc,$query_cgi, $total)=@_;
- my $dbh = C4::Context->dbh;
-
- # Add the request the user just made
- my $sql = "INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, total, time) VALUES(?, ?, ?, ?, ?, NOW())";
- my $sth = $dbh->prepare($sql);
- $sth->execute($borrowernumber, $session, $query_desc, $query_cgi, $total);
- return $dbh->last_insert_id(undef, 'search_history', undef,undef,undef);
-}
-
-sub GetSearchHistory{
- my ($borrowernumber,$session)=@_;
- my $dbh = C4::Context->dbh;
-
- # Add the request the user just made
- my $query = "SELECT FROM search_history WHERE (userid=? OR sessionid=?)";
- my $sth = $dbh->prepare($query);
- $sth->execute($borrowernumber, $session);
- return $sth->fetchall_hashref({});
-}
-
sub PurgeSearchHistory{
my ($pSearchhistory)=@_;
my $dbh = C4::Context->dbh;