@@ -, +, @@ --- .../marc21_default_matching_rules.yml | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) --- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml +++ a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_default_matching_rules.yml @@ -48,22 +48,23 @@ tables: threshold: 1000 sql_statements: - - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'isbn', 1000 FROM marc_matchers;" - - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;" - - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) SELECT MAX(matchpoint_id), 1, '020', 'a' FROM matchpoints;" + - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT matcher_id, 'isbn', 1000 FROM marc_matchers WHERE code = 'ISBN';" + - "INSERT INTO matcher_matchpoints SELECT matcher_id, matchpoint_id FROM matchpoints WHERE search_index = 'isbn';" + - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) + SELECT matchpoint_id, 1, '020', 'a' FROM matchpoints WHERE search_index = 'isbn';" - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) - SELECT MAX(matchpoint_component_id), 1, 'ISBN' FROM matchpoint_components;" + SELECT matchpoint_component_id, 1, 'ISBN' FROM matchpoint_components WHERE tag = '020';" - - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'issn', 1000 FROM marc_matchers;" - - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;" + - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT matcher_id, 'issn', 1000 FROM marc_matchers WHERE code = 'ISSN';" + - "INSERT INTO matcher_matchpoints SELECT matcher_id, matchpoint_id FROM matchpoints WHERE search_index = 'issn';" - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) - SELECT MAX(matchpoint_id), 1, '022', 'a' FROM matchpoints;" + SELECT matchpoint_id, 1, '022', 'a' FROM matchpoints WHERE search_index = 'issn';" - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) - SELECT MAX(matchpoint_component_id), 1, 'ISSN' FROM matchpoint_components;" + SELECT matchpoint_component_id, 1, 'ISSN' FROM matchpoint_components WHERE tag = '022';" - - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT MAX(matcher_id), 'local-number', 1000 FROM marc_matchers;" - - "INSERT INTO matcher_matchpoints SELECT MAX(matcher_id), MAX(matchpoint_id) FROM matchpoints;" + - "INSERT INTO matchpoints (matcher_id, search_index, score) SELECT matcher_id, 'local-number', 1000 FROM marc_matchers WHERE code = 'KohaBiblio';" + - "INSERT INTO matcher_matchpoints SELECT matcher_id, matchpoint_id FROM matchpoints WHERE search_index = 'local-number';" - "INSERT INTO matchpoint_components (matchpoint_id, sequence, tag, subfields) - SELECT MAX(matchpoint_id), 1, '999', 'c' FROM matchpoints;" + SELECT matchpoint_id, 1, '999', 'c' FROM matchpoints WHERE search_index = 'local-number';" - "INSERT INTO matchpoint_component_norms (matchpoint_component_id, sequence, norm_routine) - SELECT MAX(matchpoint_component_id), 1, 'Biblionumber' FROM matchpoint_components;" + SELECT matchpoint_component_id, 1, 'Biblionumber' FROM matchpoint_components WHERE tag = '999';" --