From 5744d8a81448eade44664148aac79aa8ca4451cb Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Wed, 17 Feb 2016 08:01:54 -0500 Subject: [PATCH] LP#1067823 Add genre facet by default and remove tag 659 from definition Since genre will work well as a facet, add it to the facets in config.tt2 so that it displays by default. Also removes the 659 MARC field from the genre definition since it is currently an unassigned tag. Release notes have been updated to reflect these changes. Signed-off-by: Kathy Lussier Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 +- Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql | 4 ++-- Open-ILS/src/templates/opac/parts/config.tt2 | 1 + Open-ILS/src/templates/opac/parts/record/subjects.tt2 | 2 +- docs/RELEASE_NOTES_NEXT/OPAC/Genre_index.txt | 13 +++++++------ 5 files changed, 12 insertions(+), 10 deletions(-) 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 d87a203238..bd8aca5d4b 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -185,7 +185,7 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, (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"]$$ ); INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field, facet_field, facet_xpath, joiner ) VALUES - (33, 'identifier', 'genre', oils_i18n_gettext(33, 'Genre', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='655' or @tag='659']$$, FALSE, TRUE, $$//*[local-name()='subfield' and contains('abvxyz',@code)]$$, ' -- ' ); -- /* to fool vim */; + (33, 'identifier', 'genre', oils_i18n_gettext(33, 'Genre', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='655']$$, FALSE, TRUE, $$//*[local-name()='subfield' and contains('abvxyz',@code)]$$, ' -- ' ); -- /* to fool vim */; 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.genre-indexing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql index 19f213d9ae..27721ee19b 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.genre-indexing.sql @@ -1,7 +1,7 @@ BEGIN; INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field, facet_field, facet_xpath, joiner ) VALUES - (33, 'identifier', 'genre', oils_i18n_gettext(33, 'Genre', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='655' or @tag='659']$$, FALSE, TRUE, $$//*[local-name()='subfield' and contains('abvxyz',@code)]$$, ' -- ' ); -- /* to fool vim */; + (33, 'identifier', 'genre', oils_i18n_gettext(33, 'Genre', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='655']$$, FALSE, TRUE, $$//*[local-name()='subfield' and contains('abvxyz',@code)]$$, ' -- ' ); -- /* to fool vim */; INSERT INTO config.metabib_field_index_norm_map (field,norm) SELECT m.id, @@ -19,6 +19,6 @@ COMMIT; \qecho \qecho SELECT metabib.reingest_metabib_field_entries(record, FALSE, TRUE, FALSE) \qecho FROM metabib.real_full_rec -\qecho WHERE tag IN (''''655'''', ''''659'''') +\qecho WHERE tag IN (''''655'''') \qecho GROUP BY record; \qecho diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 15ffda282a..6748c91e50 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -102,6 +102,7 @@ record.summary.jacket_size = 'medium'; facet.display = [ {facet_class => 'author', facet_order => ['personal', 'corporate']}, {facet_class => 'subject', facet_order => ['topic']}, + {facet_class => 'identifier', facet_order => ['genre']}, {facet_class => 'series', facet_order => ['seriestitle']}, {facet_class => 'subject', facet_order => ['name', 'geographic']} ]; diff --git a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2 index 5b9b8c6d64..9fd07c5f85 100644 --- a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/subjects.tt2 @@ -7,7 +7,7 @@ label => l('Genre: '), facet => 'identifier|genre', joiner => ' -- ', - xpath => '//*[@tag="655" or @tag="659"]', + xpath => '//*[@tag="655"]', subfields => '[abvxyz]' }, { label => l('Topic Heading: '), diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/Genre_index.txt b/docs/RELEASE_NOTES_NEXT/OPAC/Genre_index.txt index ccd702e25b..e603624b43 100644 --- a/docs/RELEASE_NOTES_NEXT/OPAC/Genre_index.txt +++ b/docs/RELEASE_NOTES_NEXT/OPAC/Genre_index.txt @@ -1,8 +1,9 @@ New Form/Genre Search and Facet Index ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The stock indexing definitions now include a search -and facet index on the form/genre field (tag 655) -and a commonly-used local genre field (659). This allows -genre links in the public catalog record display to retrieve -works in the same genre. A partial reingest during upgrade -is required to use this index. +The stock indexing definitions now include a search and facet index on the +form/genre field (tag 655). This allows genre links in the public catalog +record display to retrieve works in the same genre. The public catalog genre +links will no longer display content from the 659 MARC fields. + +The genre facet will also display by default in the public catalog. A partial +reingest during upgrade is required to use this index. -- 2.11.0