Do not quote SRU = search if index is used by Z39.50 collab/dyrcona/supercat-unquote-z3950
authorJason Stephenson <jason@sigio.com>
Wed, 15 May 2019 17:57:18 +0000 (13:57 -0400)
committerJason Stephenson <jason@sigio.com>
Wed, 15 May 2019 17:57:18 +0000 (13:57 -0400)
We configure z39.50 to use the eg.keyword, eg.title, and eg.author
indexes.  One client in particular does "=" searches when it probably
means "all."  To give that client all of the results that it expects,
we modify SuperCat to not quote the terms of an = search when one of
the previous indexes is being used.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Jason Boyer <JBoyer@library.in.gov>
Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm

index b43d266..0773f24 100644 (file)
@@ -2177,7 +2177,7 @@ sub sru_search {
                     }
                 }
 
-                $quote_it = 0 if ( $base eq 'all' );
+                $quote_it = 0 if ( $base eq 'all' || ( $base eq '=' && grep {$qualifier eq $_} qw(eg.keyword eg.title eg.author) ) );
                 $term = maybeQuote($term) if $quote_it;
 
             } else {