]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/0033.data.ingest-normalizers.sql
LP#1806968 Teach Vandelay to pass correct auth tracker type
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 0033.data.ingest-normalizers.sql
1 BEGIN;
2
3 INSERT INTO config.upgrade_log (version) VALUES ('0033'); -- miker
4
5
6 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
7         'NACO Normalize',
8         'Apply NACO normalization rules to the extracted text.  See http://www.loc.gov/catdir/pcc/naco/normrule-2.html for details.',
9         'naco_normalize',
10         0
11 );
12
13 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
14         'Normalize date range',
15         'Split date ranges in the form of "XXXX-YYYY" into "XXXX YYYY" for proper index.',
16         'split_date_range',
17         1
18 );
19
20 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
21         'NACO Normalize -- retain first comma',
22         'Apply NACO normalization rules to the extracted text, retaining the first comma.  See http://www.loc.gov/catdir/pcc/naco/normrule-2.html for details.',
23         'naco_normalize_keep_comma',
24         0
25 );
26
27 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
28         'Strip Diacritics',
29         'Convert text to NFD form and remove non-spacing combining marks.',
30         'remove_diacritics',
31         0
32 );
33
34 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
35         'Up-case',
36         'Convert text upper case.',
37         'uppercase',
38         0
39 );
40
41 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
42         'Down-case',
43         'Convert text lower case.',
44         'lowercase',
45         0
46 );
47
48 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
49         'Extract Dewey-like number',
50         'Extract a string of numeric characters ther resembles a DDC number.',
51         'call_number_dewey',
52         0
53 );
54
55 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
56         'Left truncation',
57         'Discard the specified number of characters from the left side of the string.',
58         'left_trunc',
59         1
60 );
61
62 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
63         'Right truncation',
64         'Include only the specified number of characters from the left side of the string.',
65         'right_trunc',
66         1
67 );
68
69 INSERT INTO config.index_normalizer (name, description, func, param_count) VALUES (
70         'First word',
71         'Include only the first space-separated word of a string.',
72         'first_word',
73         0
74 );
75
76
77 INSERT INTO config.metabib_field_index_norm_map (field,norm)
78         SELECT  m.id,
79                 i.id
80           FROM  config.metabib_field m,
81                 config.index_normalizer i
82           WHERE i.func IN ('naco_normalize','split_date_range');
83
84 COMMIT;
85