[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. 11f6126604c802fd6d44d24d90bb20c0061e51d9
Evergreen Git
git at git.evergreen-ils.org
Thu Apr 17 13:04:55 EDT 2014
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, rel_2_5 has been updated
via 11f6126604c802fd6d44d24d90bb20c0061e51d9 (commit)
via 3c7b20f2749a972b7890d106cb91170b29ee6a36 (commit)
via 1351a3d4fee6616c1b2aca3f019452810889c05a (commit)
from bbcd9e5859d2d1c6dccccf93fccb3b30b5f32af5 (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 11f6126604c802fd6d44d24d90bb20c0061e51d9
Author: Dan Wells <dbw2 at calvin.edu>
Date: Thu Apr 17 13:00:25 2014 -0400
Tweak 0877 upgrade file for 2.5
The 0877 upgrade file for 2.6 lacked in parsimony because it assumed
it would generally run as part of the 2.6.0 upgrade, and that required
a full reingest anyway.
Credit for this "quick" version goes to Mike Rylander.
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
Signed-off-by: Remington Steed <rjs7 at calvin.edu>
diff --git a/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql b/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
index ddab41d..2200d94 100644
--- a/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
@@ -16,10 +16,45 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
COMMIT;
-\qecho This is a full field-entry reingest of your bib records.
-\qecho It will 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 ---------------------------------------------------------------
+\qecho We will now do a "quick fix" indexing of series titles for search.
\qecho .
-SELECT COUNT(metabib.reingest_metabib_field_entries(id))
- FROM biblio.record_entry WHERE deleted IS FALSE;
+\qecho Ultimately, a full field-entry reingest of your affected series bib
+\qecho records should be done. It might take a while.
+\qecho Something like this should suffice:
+\qecho ---------------------------------------------------------------
+\qecho 'SELECT COUNT(metabib.reingest_metabib_field_entries(id))'
+\qecho ' FROM ('
+\qecho ' SELECT DISTINCT(bre.id) AS id'
+\qecho ' FROM biblio.record_entry bre'
+\qecho ' JOIN metabib.full_rec mfr'
+\qecho ' ON mfr.record = bre.id'
+\qecho ' AND mfr.tag IN (\'490\', \'800\', \'810\', \'811\', \'830\')'
+\qecho ' WHERE'
+\qecho ' bre.deleted IS FALSE'
+\qecho ' AND ('
+\qecho ' mfr.tag = \'490\' AND mfr.subfield = \'a\''
+\qecho ' OR mfr.tag IN (\'800\',\'810\',\'811\') AND mfr.subfield = \'t\''
+\qecho ' OR mfr.tag = \'830\' AND mfr.subfield IN (\'a\',\'t\')'
+\qecho ' )'
+\qecho ' ) x'
+\qecho ';'
+\qecho ---------------------------------------------------------------
+
+-- "Quick Fix" indexing of series for search
+INSERT INTO metabib.series_field_entry (field,source,value)
+ SELECT 1,record,value FROM metabib.full_rec WHERE tag = '490' AND subfield = 'a';
+
+INSERT INTO metabib.series_field_entry (field,source,value)
+ SELECT 1,record,value FROM metabib.full_rec WHERE tag IN ('800','810','811') AND subfield = 't';
+
+INSERT INTO metabib.series_field_entry (field,source,value)
+ SELECT 1,record,value FROM metabib.full_rec WHERE tag = '830' AND subfield IN ('a','t');
+
+DELETE FROM metabib.combined_series_field_entry;
+INSERT INTO metabib.combined_series_field_entry(record, metabib_field, index_vector)
+ SELECT source, field, strip(COALESCE(string_agg(index_vector::TEXT,' '),'')::tsvector)
+ FROM metabib.series_field_entry GROUP BY source, field;
+INSERT INTO metabib.combined_series_field_entry(record, index_vector)
+ SELECT source, strip(COALESCE(string_agg(index_vector::TEXT,' '),'')::tsvector)
+ FROM metabib.series_field_entry GROUP BY source;
commit 3c7b20f2749a972b7890d106cb91170b29ee6a36
Author: Ben Shum <bshum at biblio.org>
Date: Fri Mar 28 16:53:39 2014 -0400
LP#1259665 Stamping upgrade for 800t search and facets
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 174e0af..fc61312 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 ('0869', :eg_version); -- miker/csharp/bshum
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0877', :eg_version); -- dbwells/bshum
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql b/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
similarity index 94%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql
rename to Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
index bef672f..ddab41d 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
@@ -1,6 +1,6 @@
BEGIN;
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0877', :eg_version);
-- Don't use Series search field as the browse field
UPDATE config.metabib_field SET
commit 1351a3d4fee6616c1b2aca3f019452810889c05a
Author: Dan Wells <dbw2 at calvin.edu>
Date: Thu Mar 27 14:19:34 2014 -0400
LP#1259665 Split series browse config from search
When we added browse support in 2.5, we took extra care to ensure that
our series browse entries would sort and display reliably.
800t does not specify non-filing characters, so it was excluded from
browse. Unfortunately, since browse and search had a single root
config, this removed 800t from search as well.
While we may want to reconsider expanding later on, this commit takes
a conservative approach, and uses all series values for search and
facets, but only entries with a usable filing indicator will be
extracted for browse. It accomplishes this by splitting the series
config in two, one config for search/faceting, and a second config
dedicated to browse (similar to what was done for title).
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
Signed-off-by: Ben Shum <bshum at biblio.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 770443e..c5bc4a2 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -110,8 +110,8 @@ INSERT INTO config.xml_transform VALUES ( 'mods33', 'http://www.loc.gov/mods/v3'
INSERT INTO config.xml_transform VALUES ( 'marc21expand880', 'http://www.loc.gov/MARC21/slim', 'marc', '' );
-- Index Definitions
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath, browse_sort_xpath ) VALUES
- (1, 'series', 'seriestitle', oils_i18n_gettext(1, 'Series Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[@type="nfi"]$$, TRUE, '//@xlink:href', $$*[local-name() != "nonSort"]$$ );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field, authority_xpath, browse_field ) VALUES
+ (1, 'series', 'seriestitle', oils_i18n_gettext(1, 'Series Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[not(@type="nfi")]$$, TRUE, '//@xlink:href', FALSE );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, authority_xpath ) VALUES
(2, 'title', 'abbreviated', oils_i18n_gettext(2, 'Abbreviated Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='abbreviated')]$$, '//@xlink:href' );
@@ -178,6 +178,8 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath,
(30, 'identifier', 'lccn', oils_i18n_gettext(30, 'LC Control Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='010']/marc:subfield[@code="a" or @code='z']$$, FALSE);
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
(31, 'title', 'browse', oils_i18n_gettext(31, 'Title Proper (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleBrowse$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
+ (32, 'series', 'browse', oils_i18n_gettext(32, 'Series Title (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[@type="nfi"]$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
UPDATE config.metabib_field SET joiner = ' -- ' WHERE field_class = 'subject' AND name NOT IN ('name', 'complete');
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql
new file mode 100644
index 0000000..bef672f
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.re-add_800_t_search_and_facets.sql
@@ -0,0 +1,25 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+-- Don't use Series search field as the browse field
+UPDATE config.metabib_field SET
+ browse_field = FALSE,
+ browse_xpath = NULL,
+ browse_sort_xpath = NULL,
+ xpath = $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[not(@type="nfi")]$$
+WHERE id = 1;
+
+-- Create a new series browse config
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, search_field, authority_xpath, browse_field, browse_sort_xpath ) VALUES
+ (32, 'series', 'browse', oils_i18n_gettext(32, 'Series Title (Browse)', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:relatedItem[@type="series"]/mods32:titleInfo[@type="nfi"]$$, FALSE, '//@xlink:href', TRUE, $$*[local-name() != "nonSort"]$$ );
+
+COMMIT;
+
+\qecho This is a full field-entry reingest of your bib records.
+\qecho It will 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 COUNT(metabib.reingest_metabib_field_entries(id))
+ FROM biblio.record_entry WHERE deleted IS FALSE;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 6 +-
.../0877.data.re-add_800_t_search_and_facets.sql | 60 ++++++++++++++++++++
3 files changed, 65 insertions(+), 3 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0877.data.re-add_800_t_search_and_facets.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list