[open-ils-commits] r19849 - trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg (dbwells)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 22 10:39:58 EDT 2011


Author: dbwells
Date: 2011-03-22 10:39:56 -0400 (Tue, 22 Mar 2011)
New Revision: 19849

Modified:
   trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Log:
Honor the 'active' flag in QueryParser.pm for search.relevance_adjustment entries.


Modified: trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm	2011-03-22 01:26:31 UTC (rev 19848)
+++ trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm	2011-03-22 14:39:56 UTC (rev 19849)
@@ -208,7 +208,11 @@
     my $multiplier = shift;
     my $active = shift;
 
-    $active = 1 if (!defined($active));
+    if (defined($active) and $active eq 'f') {
+        $active = 0;
+    } else {
+        $active = 1;
+    }
 
     $self->relevance_bumps->{$class}{$field}{$type} = { multiplier => $multiplier, active => $active };
 
@@ -248,7 +252,7 @@
 
     for my $sra (@$sra_list) {
         my $c = $self->search_field_class_by_id( $sra->field );
-        __PACKAGE__->add_relevance_bump( $c->{classname}, $c->{field}, $sra->bump_type, $sra->multiplier );
+        __PACKAGE__->add_relevance_bump( $c->{classname}, $c->{field}, $sra->bump_type, $sra->multiplier, $sra->active );
     }
 
     return $self->relevance_bumps;



More information about the open-ils-commits mailing list