pre-svf mattype filter (well, facet) handing for kcls; opac-tt-poc-presvf
authorberick <berick@esilibrary.com>
Wed, 20 Apr 2011 15:20:46 +0000 (11:20 -0400)
committerberick <berick@esilibrary.com>
Wed, 20 Apr 2011 15:20:46 +0000 (11:20 -0400)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm

index 272a3fc..ccdf415 100644 (file)
@@ -54,7 +54,13 @@ sub _prepare_biblio_search {
     foreach (grep /^fi:/, $cgi->param) {
         /:(\w+)$/ or next;
         my $term = join(",", $cgi->param($_));
-        $query .= " $1($term)" if length $term;
+        next unless length $term;
+        if($_ eq 'fi:format') {
+            # XXX pre-svf KCLS mattype filtering... 
+            $query .= " identifier|mattype[$term]";
+        } else {
+            $query .= " $1($term)";
+        }
     }
 
     if ($cgi->param('sort')) {
@@ -116,6 +122,8 @@ sub load_rresults {
 
     $query = "$query $facet" if $facet; # TODO
 
+    $logger->activity("EGWeb: [search] $query");
+
     my $results;
 
     try {