TPac: first try audience_group SVF for audience maps
Allow for configuration of an "audience_group"
config.record_attr_definition for collecting MARC audience codes into more
human-friendly groups. This allows the TPac to behave more like the
current OPAC, which groups audience values into simpler collections. As
with "mattype", if no "audience_group" configuration exists, fall back to
the traditional, long-form "audience" attribute.
For future referene, here's an example setup using an "audience_group"
attribute.
-- Can be done in MARC Record Attributes admin UI
INSERT INTO config.record_attr_definition
(name, label, description, fixed_field, filter)
VALUES
('audience_group', 'Audience Group', 'Audience Group', 'Audn', TRUE);
-- Can be done in MARC Coded Value Maps admin UI
INSERT INTO config.coded_value_map
(ctype, code, value, description)
VALUES
('audience_group', 'A', 'Adult', 'Adult Audience'),
('audience_group', 'T', 'Teen', 'Teen Audience'),
('audience_group', 'C', 'Children', 'Children Audience');
-- No UI currently
INSERT INTO config.record_attr_index_norm_map
(attr, norm, params)
VALUES
('audience_group', (
SELECT id FROM
config.index_normalizer WHERE func =
'generic_map_normalizer'
),
'["=>A g,e,f=>A a,c,j,b=>C d=>T"]'
);
Signed-off-by: Bill Erickson <berick@esilibrary.com>