Start out exact-ou-match rules with an "always win" weight
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 13:45:00 +0000 (13:45 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Oct 2010 13:45:00 +0000 (13:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@18196 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/110.hold_matrix.sql

index 5bc1ff5..7190a36 100644 (file)
@@ -96,7 +96,11 @@ BEGIN
                     CASE WHEN m.marc_vr_format    IS NOT NULL THEN 2 ELSE 0 END +
                     CASE WHEN m.ref_flag        IS NOT NULL THEN 1 ELSE 0 END DESC LOOP
 
-            current_mp_weight := 5.0;
+            IF NOT current_mp.strict_ou_match THEN
+                current_mp_weight := 5.0;
+            ELSE
+                current_mp_weight := 0.0;
+            END IF;
 
             IF current_mp.circ_modifier IS NOT NULL THEN
                 CONTINUE WHEN current_mp.circ_modifier <> item_object.circ_modifier OR item_object.circ_modifier IS NULL;