Coded value map index normalizer user/berick/coded-value-map-normalizer
authorBill Erickson <berick@esilibrary.com>
Tue, 3 Jan 2012 21:41:42 +0000 (16:41 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 4 Jan 2012 14:54:00 +0000 (09:54 -0500)
commit6cba4bde050214dd8bd4d57c50e24e51d850cc48
tree9848f8630fd08b850f9715a622582a3f9b8e4d42
parente0896f470df01957b192a60a9b2b8496309516ea
Coded value map index normalizer

New index normalizer which maps a coded value from the record to the
display value configured in config.coded_value_map.  The normalizer is
applied with one parameter, the ctype of the coded_value_map to use for
the mapping.

E.g config.metabib_field_index_norm_map:

id | field | norm |    params     | pos
---+-------+------+---------------+-----
57 |    31 |   17 | ["item_lang"] |  -1

* pos = -1 causes this normalizer to be applied to facet_entry's

This is primarily useful for facets.  For example, you could create a
metabib_field for language and mark it as a facet_field.  Applying this
index would allow the mapped language names (e.g. "French" instead of
"fre") to display as facets.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/999.functions.global.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.coded-value-map-index-normalizer.sql [new file with mode: 0644]