[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8e1e36da44a3a73c70055786c044bfe45782dbae

Evergreen Git git at git.evergreen-ils.org
Sun Feb 19 11:49:58 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  8e1e36da44a3a73c70055786c044bfe45782dbae (commit)
       via  e66473d70f56b2690bfe15543c4019c3cbaf513c (commit)
       via  2e0e3feba72d2d871fb12e02a2725de46353bcba (commit)
      from  5757ab093599b0f98b178dc879032f555fc8f878 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8e1e36da44a3a73c70055786c044bfe45782dbae
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Sun Feb 19 11:47:22 2017 -0500

    LP#1662541: Release notes entry for additional subject browse headings
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/additional-subject-browse-indexes.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/additional-subject-browse-indexes.adoc
new file mode 100644
index 0000000..1c2a41a
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/OPAC/additional-subject-browse-indexes.adoc
@@ -0,0 +1,18 @@
+New Subject Browse Index Definitions
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+New subject browse index definitions have been added that display the entire
+heading as a unit with hyphens between terms instead of displaying individual
+terms separately. 
+
+For example, the browse heading for:
+
+=650 \0$aCats$zUnited States$vCorrespondence.
+
+will display in a single entry as:
+
+Cats -- United States -- Correspondence
+
+Rather than separate entries for Cats and United States. 
+
+Name subjects will continue to display as separate entries because additional
+work would be required for the heading to be punctuated correctly.

commit e66473d70f56b2690bfe15543c4019c3cbaf513c
Author: Kathy Lussier <klussier at masslnc.org>
Date:   Sun Feb 19 11:36:16 2017 -0500

    LP#1662541: Stamping upgrade script for added subject browse indexes
    
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 4281c59..946ca60 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1025', :eg_version); -- bshum/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1026', :eg_version); -- gmcharlt/kmlussier
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.subject_browse.sql b/Open-ILS/src/sql/Pg/upgrade/1026.data.subject_browse.sql
similarity index 97%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.subject_browse.sql
rename to Open-ILS/src/sql/Pg/upgrade/1026.data.subject_browse.sql
index be6981d..4a26a5a 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.subject_browse.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1026.data.subject_browse.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1026', :eg_version);
 
 INSERT INTO config.metabib_field ( id, field_class, name, label, 
      format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES

commit 2e0e3feba72d2d871fb12e02a2725de46353bcba
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Fri Feb 17 16:40:02 2017 -0500

    LP#1662541: several new subject browse index definitions
    
    This patch adds several config.metabib_field definitions
    that are specifically for subject browses:
    
    subject / topic_browse
    subject / geographic_browse
    subject / temporal_browse
    
    These new definitions index the entire heading as a unit,
    so a heading like this:
    
    =650 \0$aCats$zUnited States$vCorrespondence.
    
    will end up in the subject/topic_browse index as a single
    entry for
    
    Cats -- United States -- Correspondence
    
    rather than separate browse entries for "Cats" as a subject/topic,
    and "United States" as a subject/geographic.
    
    Since the new *_browse indexes are meant to replace the browse
    functions of the existing subject/topic, subject/geographic, and
    subject/temporal indexes, the browse flag is turned off for the
    older definitions.
    
    This patch intentionally does not include an entry for subject/name_browse,
    as additional coding would be required to get the display form of the
    heading to be punctuated correctly.
    
    To test
    -------
    [1] After applying the patch, perform subject browses in the
        OPAC and staff interfaces and verify that fully composed
        headings from bib records are now displayed as browse entries.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index f831fc9..d294365 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -136,14 +136,14 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field, authority_xpath, browse_xpath ) VALUES 
     (10, 'author', 'other', oils_i18n_gettext(10, 'Other Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='personal' and not(mods32:role/mods32:roleTerm[text()='creator'])]$$, $$//*[local-name()='namePart']$$, TRUE, '//@xlink:href',$$//*[local-name()='namePart']$$ ); -- /* to fool vim */;
 
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath ) VALUES 
-    (11, 'subject', 'geographic', oils_i18n_gettext(11, 'Geographic Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:geographic$$, TRUE, '//@xlink:href' );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath, browse_field ) VALUES 
+    (11, 'subject', 'geographic', oils_i18n_gettext(11, 'Geographic Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:geographic$$, TRUE, '//@xlink:href', FALSE );
 INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field, authority_xpath ) VALUES 
     (12, 'subject', 'name', oils_i18n_gettext(12, 'Name Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:name$$, $$//*[local-name()='namePart']$$, TRUE, '//@xlink:href' ); -- /* to fool vim */;
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath ) VALUES 
-    (13, 'subject', 'temporal', oils_i18n_gettext(13, 'Temporal Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:temporal$$, TRUE, '//@xlink:href' );
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath ) VALUES 
-    (14, 'subject', 'topic', oils_i18n_gettext(14, 'Topic Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:topic$$, TRUE, '//@xlink:href' );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath, browse_field ) VALUES 
+    (13, 'subject', 'temporal', oils_i18n_gettext(13, 'Temporal Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:temporal$$, TRUE, '//@xlink:href', FALSE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath, browse_field ) VALUES 
+    (14, 'subject', 'topic', oils_i18n_gettext(14, 'Topic Subject', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject/mods32:topic$$, TRUE, '//@xlink:href', FALSE );
 --INSERT INTO config.metabib_field ( id, field_class, name, format, xpath ) VALUES 
 --  ( 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 
@@ -189,6 +189,29 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
 
 UPDATE config.metabib_field SET joiner = ' -- ' WHERE field_class = 'subject' AND name NOT IN ('name', 'complete');
 
+INSERT INTO config.metabib_field ( id, field_class, name, label, 
+     format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
+    (34, 'subject', 'topic_browse', oils_i18n_gettext(34, 'Topic Browse', 'cmf', 'label'), 
+     'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "topic"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, 
+     format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
+    (35, 'subject', 'geographic_browse', oils_i18n_gettext(35, 'Geographic Name Browse', 'cmf', 'label'), 
+     'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "geographic"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, 
+     format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
+    (36, 'subject', 'temporal_browse', oils_i18n_gettext(36, 'Temporal Term Browse', 'cmf', 'label'), 
+     'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "temporal"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
+
+INSERT INTO config.metabib_field_index_norm_map (field,norm)
+    SELECT  m.id,
+            i.id
+      FROM  config.metabib_field m,
+        config.index_normalizer i
+      WHERE i.func IN ('naco_normalize')
+            AND m.id IN (34, 35, 36);
+
 SELECT SETVAL('config.metabib_field_id_seq', GREATEST(1000, (SELECT MAX(id) FROM config.metabib_field)));
 
 INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('kw','keyword');
@@ -13230,19 +13253,19 @@ INSERT INTO authority.control_set_bib_field_metabib_field_map (bib_field, metabi
 
     SELECT  DISTINCT b.id AS bib_field, m.id AS metabib_field
       FROM  authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
-      WHERE a.tag = '148' AND m.name = 'temporal'
+      WHERE a.tag = '148' AND m.name = 'temporal_browse'
 
         UNION
 
     SELECT  DISTINCT b.id AS bib_field, m.id AS metabib_field
       FROM  authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
-      WHERE a.tag = '150' AND m.name = 'topic'
+      WHERE a.tag = '150' AND m.name = 'topic_browse'
 
         UNION
 
     SELECT  DISTINCT b.id AS bib_field, m.id AS metabib_field
       FROM  authority.control_set_bib_field b JOIN authority.control_set_authority_field a ON (b.authority_field = a.id), config.metabib_field m
-      WHERE a.tag = '151' AND m.name = 'geographic'
+      WHERE a.tag = '151' AND m.name = 'geographic_browse'
 
         UNION
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.subject_browse.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.subject_browse.sql
new file mode 100644
index 0000000..be6981d
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.subject_browse.sql
@@ -0,0 +1,58 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, 
+     format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
+    (34, 'subject', 'topic_browse', oils_i18n_gettext(34, 'Topic Browse', 'cmf', 'label'), 
+     'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "topic"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, 
+     format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
+    (35, 'subject', 'geographic_browse', oils_i18n_gettext(35, 'Geographic Name Browse', 'cmf', 'label'), 
+     'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "geographic"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, 
+     format, xpath, search_field, browse_field, authority_xpath, joiner ) VALUES
+    (36, 'subject', 'temporal_browse', oils_i18n_gettext(36, 'Temporal Term Browse', 'cmf', 'label'), 
+     'mods32', $$//mods32:mods/mods32:subject[local-name(./*[1]) = "temporal"]$$, FALSE, TRUE, '//@xlink:href', ' -- ' ); -- /* to fool vim */;
+
+INSERT INTO config.metabib_field_index_norm_map (field,norm)
+    SELECT  m.id,
+            i.id
+      FROM  config.metabib_field m,
+        config.index_normalizer i
+      WHERE i.func IN ('naco_normalize')
+            AND m.id IN (34, 35, 36);
+
+UPDATE config.metabib_field
+SET browse_field = FALSE
+WHERE field_class = 'subject' AND name = 'topic'
+AND id = 14;
+UPDATE config.metabib_field
+SET browse_field = FALSE
+WHERE field_class = 'subject' AND name = 'geographic'
+AND id = 13;
+UPDATE config.metabib_field
+SET browse_field = FALSE
+WHERE field_class = 'subject' AND name = 'temporal'
+AND id = 11;
+
+UPDATE authority.control_set_bib_field_metabib_field_map
+SET metabib_field = 34
+WHERE metabib_field = 14;
+UPDATE authority.control_set_bib_field_metabib_field_map
+SET metabib_field = 35
+WHERE metabib_field = 13;
+UPDATE authority.control_set_bib_field_metabib_field_map
+SET metabib_field = 36
+WHERE metabib_field = 11;
+
+COMMIT;
+
+\qecho This is a browse-only reingest of your bib records. It may take a while.
+\qecho You may cancel now without losing the effect of the rest of the
+\qecho upgrade script, and arrange the reingest later.
+\qecho .
+SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE)
+    FROM biblio.record_entry;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   41 +++++++++++---
 .../sql/Pg/upgrade/1026.data.subject_browse.sql    |   58 ++++++++++++++++++++
 .../OPAC/additional-subject-browse-indexes.adoc    |   18 ++++++
 4 files changed, 109 insertions(+), 10 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1026.data.subject_browse.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/additional-subject-browse-indexes.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list