BZ4116: results from cataloging search is different from advanced search results
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Wed, 10 Feb 2010 16:13:41 +0000 (17:13 +0100)
committerGalen Charlton <gmcharlt@gmail.com>
Thu, 11 Feb 2010 11:31:57 +0000 (06:31 -0500)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

C4/Search.pm
cataloguing/addbooks.pl

index 22eac78..14e85ce 100644 (file)
@@ -1649,7 +1649,6 @@ sub searchResults {
         }
 
         # XSLT processing of some stuff
-       my $debug=1;
        use C4::Charset;
        SetUTF8Flag($marcrecord);
        $debug && warn $marcrecord->as_formatted;
index e911391..b08f1e5 100755 (executable)
@@ -68,8 +68,13 @@ foreach my $thisframeworkcode ( sort {$frameworks->{$a} cmp $frameworks->{$b}}ke
 # Searching the catalog.
 if ($query) {
 
+    # build query
+    my @operands = $query;
+    my (@operators, @indexes, @sort_by, @limits) = ();
+    my ( $builterror,$builtquery,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$stopwords_removed,$query_type) = buildQuery(\@operators,\@operands,\@indexes,@limits,\@sort_by,undef,undef);
+
     # find results
-    my ( $error, $marcresults, $total_hits ) = SimpleSearch($query, $results_per_page * ($page - 1), $results_per_page);
+    my ( $error, $marcresults, $total_hits ) = SimpleSearch($builtquery, $results_per_page * ($page - 1), $results_per_page);
 
     if ( defined $error ) {
         $template->param( error => $error );