(4, 'title', 'alternative', oils_i18n_gettext(4, 'Alternate Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='alternative')]$$, '//@xlink:href' );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, authority_xpath ) VALUES
(5, 'title', 'uniform', oils_i18n_gettext(5, 'Uniform Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='uniform')]$$, '//@xlink:href' );
-INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, authority_xpath ) VALUES
- (6, 'title', 'proper', oils_i18n_gettext(6, 'Title Proper', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleNonfiling[mods32:title and not (@type)]$$, '//@xlink:href' );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, authority_xpath, browse_field ) VALUES
+ (6, 'title', 'proper', oils_i18n_gettext(6, 'Title Proper', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleNonfiling[mods32:title and not (@type)]$$, '//@xlink:href', FALSE );
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field , authority_xpath) VALUES
(7, 'author', 'corporate', oils_i18n_gettext(7, 'Corporate Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='corporate' and (mods32:role/mods32:roleTerm[text()='creator'] or mods32:role/mods32:roleTerm[text()='aut'] or mods32:role/mods32:roleTerm[text()='cre'])]$$, $$//*[local-name()='namePart']$$, TRUE, '//@xlink:href' ); -- /* to fool vim */;
(29, 'identifier', 'scn', oils_i18n_gettext(29, 'System Control Number', 'cmf', 'label'), 'marcxml', $$//marc:datafield[@tag='035']/marc:subfield[@code="a"]$$, FALSE);
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, browse_field) VALUES
(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, xpath, format, search_field, facet_field, browse_field) VALUES
+ (31, 'title', 'browse', oils_i18n_gettext(31, 'Title Proper (Browse)', 'cmf', 'label'), $$//mods32:mods/mods32:titleInfo[not (@type)]/mods32:title$$, 'mods32', FALSE, FALSE, TRUE);
+
SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE);
ALTER TABLE config.metabib_field ADD COLUMN authority_xpath TEXT;
+-- The following UPDATE also affects AutoSuggest, but not in a way users
+-- are likely to find objectionable. The selection of suggestions based
+-- on user input shouldn't change, but the displayed heading will no longer
+-- show leading articles or similar that can be rubbed out by non-filing
+-- indicators.
+change
+UPDATE config.metabib_field SET browse_field = FALSE
+ WHERE field_class = 'title' and name = 'proper';
+
UPDATE config.metabib_field
SET authority_xpath = '//@xlink:href'
WHERE
field_class IN ('subject','series','title','author') AND
browse_field IS TRUE;
+INSERT INTO config.metabib_field (
+ id, field_class, name, label, xpath, format,
+ search_field, facet_field, browse_field
+) VALUES (
+ 31, 'title', 'browse',
+ oils_i18n_gettext(31, 'Title Proper (Browse)', 'cmf', 'label'),
+ $$//mods32:mods/mods32:titleInfo[not (@type)]/mods32:title$$,
+ 'mods32', FALSE, FALSE, TRUE
+);
+
ALTER TYPE metabib.field_entry_template ADD ATTRIBUTE authority BIGINT;
output_row.search_field = TRUE;
RETURN NEXT output_row;
+ output_row.search_field = FALSE;
END IF;
END LOOP;
</xsl:stylesheet>$$ WHERE name = 'mods33';
-INSERT INTO config.global_flag (name, value, enabled, label)
+INSERT INTO config.global_flag (name, value, enabled, label)
VALUES (
'opac.browse.warnable_regexp_per_class',
'{"title": "^(a|the|an)\\s"}',