View | Details | Raw Unified | Return to bug 24593
Collapse All | Expand All

(-)a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.sql (-46 lines)
Lines 1-46 Link Here
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
9
-- under the terms of the GNU General Public License as published by
10
-- the Free Software Foundation; either version 3 of the License, or
11
-- (at your option) any later version.
12
--
13
-- Koha is distributed in the hope that it will be useful, but
14
-- WITHOUT ANY WARRANTY; without even the implied warranty of
15
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
-- GNU General Public License for more details.
17
--
18
-- You should have received a copy of the GNU General Public License
19
-- along with Koha; if not, see <http://www.gnu.org/licenses>.
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;
(-)a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.txt (-5 lines)
Lines 1-5 Link Here
1
Selected matching rules for MARC 21 bibliographic
2
records, including:
3
4
ISBN
5
ISSN
(-)a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml (-1 / +69 lines)
Line 0 Link Here
0
- 
1
---
2
#
3
#  Copyright 2020 Koha Development Team
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
# *************************************************************
21
#      Default MARC matching rules for Koha
22
# *************************************************************
23
24
description:
25
  - "Selected matching rules for MARC 21 bibliographic records, including:"
26
  - ""
27
  - "ISBN"
28
  - "ISSN"
29
30
tables:
31
  - marc_matchers:
32
      translatable: []
33
      multiline: []
34
      rows:
35
        - code: "ISBN"
36
          description: "020$a"
37
          record_type: biblio
38
          threshold: 1000
39
40
        - code: "ISSN"
41
          description: "022$a"
42
          record_type: biblio
43
          threshold: 1000
44
45
        - code: "KohaBiblio"
46
          description: "999$c"
47
          record_type: biblio
48
          threshold: 1000
49
50
sql_statements:
51
  - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers;"
52
  - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;"
53
  - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) SELECT MAX(matchpoint_id), 1, '020', 'a' FROM matchpoints;"
54
  - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine)
55
     SELECT MAX(matchpoint_component_id), 1, 'ISBN' FROM matchpoint_components;"
56
57
  - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 1000 FROM marc_matchers;"
58
  - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;"
59
  - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields)
60
     SELECT MAX(matchpoint_id), 1, '022', 'a' FROM matchpoints;"
61
  - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine)
62
     SELECT MAX(matchpoint_component_id), 1, 'ISSN' FROM matchpoint_components;"
63
64
  - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'local-number', 1000 FROM marc_matchers;"
65
  - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;"
66
  - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields)
67
     SELECT MAX(matchpoint_id), 1, '999', 'c' FROM matchpoints;"
68
  - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine)
69
     SELECT MAX(matchpoint_component_id), 1, 'Biblionumber' FROM matchpoint_components;"

Return to bug 24593