Remove quotes from "does not contain" search. user/kmlussier/lp1019360
authorKathy Lussier <klussier@masslnc.org>
Wed, 1 Aug 2012 01:50:03 +0000 (21:50 -0400)
committerKathy Lussier <klussier@masslnc.org>
Wed, 1 Aug 2012 01:50:03 +0000 (21:50 -0400)
The "does not contain" search operator surrounded the excluded terms in
quotes. In systems with multiple keyword indexes, adding these quotes led
to many first-page results that contained the excluded terms. This will
remove those quotes from the search.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm

index 5d40319..c372f79 100644 (file)
@@ -35,8 +35,6 @@ sub _prepare_biblio_search_basics {
         # the weird things Real Users will surely type in.
         $contains = "" unless defined $contains; # silence warning
         if ($contains eq 'nocontains') {
-            $query =~ s/"//g;
-            $query = ('"' . $query . '"') if index $query, ' ';
             $query = '-' . $query;
         } elsif ($contains eq 'phrase') {
             $query =~ s/"//g;