fd812055a16410ed65b87383e9a65fe780a7affc
[koha.git] / installer / data / mysql / uk-UA / marcflavour / marc21 / optional / marc21_default_matching_rules.sql
1 -- Default MARC matching rules for Koha
2 --
3 -- Copyright (C) 2007 LiblimeA
4 --
5 -- This file is part of Koha.
6 --
7 -- Koha is free software; you can redistribute it and/or modify it under the
8 -- terms of the GNU General Public License as published by the Free Software
9 -- Foundation; either version 2 of the License, or (at your option) any later
10 -- version.
11
12 -- Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 -- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 -- A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
16 -- You should have received a copy of the GNU General Public License along
17 -- with Koha; if not, write to the Free Software Foundation, Inc.,
18 -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20 INSERT INTO marc_matchers (code, description, record_type, threshold)
21     VALUES ('ISBN', '020$a', 'biblio', 1000);
22 INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers;
23 INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;
24 INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields)
25     SELECT MAX(matchpoint_id), 1, '020', 'a' FROM matchpoints;
26 INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine)
27     SELECT MAX(matchpoint_component_id), 1, 'ISBN' FROM matchpoint_components;
28
29 INSERT INTO marc_matchers (code, description, record_type, threshold)
30     VALUES ('ISSN', '022$a', 'biblio', 1000);
31 INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 1000 FROM marc_matchers;
32 INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;
33 INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields)
34     SELECT MAX(matchpoint_id), 1, '022', 'a' FROM matchpoints;
35 INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine)
36     SELECT MAX(matchpoint_component_id), 1, 'ISSN' FROM matchpoint_components;
37
38 INSERT INTO marc_matchers (code, description, record_type, threshold)
39     VALUES ('KohaBiblio', '999$c', 'biblio', 1000);
40 INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'local-number', 1000 FROM marc_matchers;
41 INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;
42 INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields)
43     SELECT MAX(matchpoint_id), 1, '999', 'c' FROM matchpoints;
44 INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine)
45     SELECT MAX(matchpoint_component_id), 1, 'Biblionumber' FROM matchpoint_components;