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