[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.8,1.9
Paul POULAIN
tipaul at users.sourceforge.net
Mon Nov 24 17:53:13 CET 2003
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1:/tmp/cvs-serv28928/C4
Modified Files:
SearchMarc.pm
Log Message:
fixing a bug in searches with stopwords (that where not dropped).
Moving "contains" as 1st choice for the search (= default one)
Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** SearchMarc.pm 8 Jul 2003 11:59:08 -0000 1.8
--- SearchMarc.pm 24 Nov 2003 16:53:10 -0000 1.9
***************
*** 90,98 ****
foreach my $word (split(/ /, @$value[$i])) # if operator is contains, splits the words in separate requests
{
! push @not_tags, @$tags[$i];
! push @not_subfields, @$subfields[$i];
! push @not_and_or, "or"; # as request is negated, finds "foo" or "bar" if final request is NOT "foo" and "bar"
! push @not_operator, @$operator[$i];
! push @not_value, $word;
}
}
--- 90,100 ----
foreach my $word (split(/ /, @$value[$i])) # if operator is contains, splits the words in separate requests
{
! unless (C4::Context->stopwords->{uc($word)}) { #it's NOT a stopword => use it. Otherwise, ignore
! push @not_tags, @$tags[$i];
! push @not_subfields, @$subfields[$i];
! push @not_and_or, "or"; # as request is negated, finds "foo" or "bar" if final request is NOT "foo" and "bar"
! push @not_operator, @$operator[$i];
! push @not_value, $word;
! }
}
}
***************
*** 112,120 ****
foreach my $word (split(/ /, @$value[$i]))
{
! push @normal_tags, @$tags[$i];
! push @normal_subfields, @$subfields[$i];
! push @normal_and_or, "and"; # assumes "foo" and "bar" if "foo bar" is entered
! push @normal_operator, @$operator[$i];
! push @normal_value, $word;
}
}
--- 114,124 ----
foreach my $word (split(/ /, @$value[$i]))
{
! unless (C4::Context->stopwords->{uc($word)}) { #it's NOT a stopword => use it. Otherwise, ignore
! push @normal_tags, @$tags[$i];
! push @normal_subfields, @$subfields[$i];
! push @normal_and_or, "and"; # assumes "foo" and "bar" if "foo bar" is entered
! push @normal_operator, @$operator[$i];
! push @normal_value, $word;
! }
}
}
More information about the Koha-cvs
mailing list