Browse Source

introducing new features :

* search on non marc fields : the marc field is found by a sub in Biblio.pm
* ordering a search

This commit shows the sql in log. Pls test it's correctly indexed (using : explain <sql_in_log>)
3.0.x
tipaul 20 years ago
parent
commit
98dbf5769f
  1. 10
      search.marc/search.pl

10
search.marc/search.pl

@ -108,17 +108,23 @@ if ($op eq "do_search") {
$resultsperpage= $query->param('resultsperpage');
$resultsperpage = 19 if(!defined $resultsperpage);
my $orderby = $query->param('orderby');
# builds tag and subfield arrays
my @tags;
foreach my $marc (@marclist) {
push @tags, $dbh->quote(substr($marc,0,4));
my ($tag,$subfield) = MARCfind_marc_from_kohafield($dbh,$marc);
if ($tag) {
push @tags,$dbh->quote("$tag$subfield");
} else {
push @tags, $dbh->quote(substr($marc,0,4));
}
}
findseealso($dbh,\@tags);
my ($results,$total) = catalogsearch($dbh, \@tags,\@and_or,
\@excluding, \@operator, \@value,
$startfrom*$resultsperpage, $resultsperpage);
$startfrom*$resultsperpage, $resultsperpage,$orderby);
($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "search.marc/result.tmpl",

Loading…
Cancel
Save