koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/C4 Search.pm [dev_week]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/C4 Search.pm [dev_week]
Date: Tue, 21 Nov 2006 15:37:40 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Joshua Ferraro <kados>  06/11/21 15:37:40

Modified files:
        C4             : Search.pm 

Log message:
        Fixes two bugs:
        
        1. stemmed operators < 3 chars weren't being skipped (bad syntax)
        2. FindDuplicate was failing when the title contained '(' or ')' 

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Search.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.99.2.11.2.32&r2=1.99.2.11.2.33

Patches:
Index: Search.pm
===================================================================
RCS file: /sources/koha/koha/C4/Search.pm,v
retrieving revision 1.99.2.11.2.32
retrieving revision 1.99.2.11.2.33
diff -u -b -r1.99.2.11.2.32 -r1.99.2.11.2.33
--- Search.pm   15 Nov 2006 19:18:48 -0000      1.99.2.11.2.32
+++ Search.pm   21 Nov 2006 15:37:40 -0000      1.99.2.11.2.33
@@ -18,6 +18,7 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+#use warnings;
 require Exporter;
 use DBI;
 use C4::Context;
@@ -39,7 +40,7 @@
 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.99.2.11.2.32 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.99.2.11.2.33 $' =~ /\d+/g;
           shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
 
 =head1 NAME
@@ -438,6 +439,8 @@
        }else{
                $result->{title}=~s /\\//g;
                $result->{title}=~s /\"//g;
+               $result->{title}=~s /\(//g;
+               $result->{title}=~s /\)//g;
                $query = "ti,ext=$result->{title}";
        }
        my 
($possible_duplicate_record)=C4::Biblio::getRecord("biblioserver",$query,"usmarc");
@@ -3167,7 +3170,7 @@
                        my $stems = $stemmer->stem(@words);
                        foreach my $stem(@$stems) {
                                $stemmed_operand.="$stem";
-                               $stemmed_operand.="?" unless ($stem 
=~/(and$|or$|not$)/) || (length($stem<3));
+                               $stemmed_operand.="?" unless ($stem 
=~/(and$|or$|not$)/) || (length($stem)<3);
                                $stemmed_operand.=" ";
                                                #warn "STEM: $stemmed_operand";
                        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]