From c17b17f957c0fbf94b6182dc61666de010b0dcdc Mon Sep 17 00:00:00 2001 From: rangi Date: Mon, 6 Mar 2006 04:31:18 +0000 Subject: [PATCH] Tweaking searching --- C4/SearchMarc.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/SearchMarc.pm b/C4/SearchMarc.pm index 0758cae716..c374679885 100644 --- a/C4/SearchMarc.pm +++ b/C4/SearchMarc.pm @@ -223,13 +223,15 @@ sub catalogsearch { $query .= " and " if ($query); my $field = $tagslib->{$tag}->{$subfield}->{kohafield}; if ($field eq 'biblio.author') { - $query .= "Author= \"".@$value[$i]."\""; + $query .= "Author all \"".@$value[$i]."\""; } elsif ($field eq 'biblio.title') { - $query .= "Title= \"".@$value[$i]."\""; + $query .= "Title all \"".@$value[$i]."\""; } elsif ($field eq 'biblioitems.isbn') { $query .= "Isbn= ".@$value[$i]; } else { - $query .= @$value[$i]; + my @spacedout=split(/ /,@$value[$i]); + my $text = join(" and ",@spacedout); + $query .= "$text"; } } # warn "$i : ".@$tags[$i]. "=> $tag / $subfield = ".$tagslib->{$tag}->{$subfield}->{kohafield}; -- 2.39.5