Don't index "All Subjects" (the subject|complete field) for browse/suggest
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 26 Jan 2012 16:35:53 +0000 (11:35 -0500)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 26 Jan 2012 16:35:53 +0000 (11:35 -0500)
It's redundant. Credit Miker.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/YYYY.schema.bib_autosuggest.sql

index 55d1899..ef53fbf 100644 (file)
@@ -143,8 +143,8 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
 --  ( id, field_class, name, xpath ) VALUES ( 'subject', 'genre', 'mods32', $$//mods32:mods/mods32:genre$$ );
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field ) VALUES 
     (15, 'keyword', 'keyword', oils_i18n_gettext(15, 'General Keywords', 'cmf', 'label'), 'mods32', $$//mods32:mods/*[not(local-name()='originInfo')]$$, FALSE ); -- /* to fool vim */;
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
-    (16, 'subject', 'complete', oils_i18n_gettext(16, 'All Subjects', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject$$ );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field ) VALUES
+    (16, 'subject', 'complete', oils_i18n_gettext(16, 'All Subjects', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject$$, FALSE );
 
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
     (17, 'identifier', 'accession', oils_i18n_gettext(17, 'Accession Number', 'cmf', 'label'), 'marcxml', $$//marc:controlfield[@tag='001']$$ );
index 5099f1d..896cca2 100644 (file)
@@ -36,7 +36,8 @@ ALTER TABLE config.metabib_field ADD COLUMN restrict BOOLEAN DEFAULT FALSE NOT N
 -- one good exception to default true:
 UPDATE config.metabib_field
     SET browse_field = FALSE
-    WHERE field_class = 'keyword' AND name = 'keyword';
+    WHERE (field_class = 'keyword' AND name = 'keyword') OR
+        (field_class = 'subject' AND name = 'complete');
 
 -- AFTER UPDATE OR INSERT trigger for biblio.record_entry
 -- We're only touching it here to add a DELETE statement to the IF NEW.deleted