From 8746c2ec573069a0be20ef142b0a52266597202f Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 9 Sep 2021 13:20:29 -0400 Subject: [PATCH] Lp 1943168: Add Marc Stream Importer Match Quality Ratio Options Add options to specify the match quality ratio when running marc_stream_importer.pl. There are separate options for bibs and authorities: --bib-match-quality-ratio=f --auth-match-quality-ratio=f They take floating point arguments and correspond to the similar option in the Vandelay import screen. Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- Open-ILS/src/support-scripts/marc_stream_importer.pl.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.pl.in b/Open-ILS/src/support-scripts/marc_stream_importer.pl.in index 4f2a1df80e..455835eb93 100755 --- a/Open-ILS/src/support-scripts/marc_stream_importer.pl.in +++ b/Open-ILS/src/support-scripts/marc_stream_importer.pl.in @@ -75,10 +75,12 @@ my $bib_import_no_match; my $bib_auto_overlay_exact; my $bib_auto_overlay_1match; my $bib_auto_overlay_best_match; +my $bib_match_quality_ratio; my $auth_import_no_match; my $auth_auto_overlay_exact; my $auth_auto_overlay_1match; my $auth_auto_overlay_best_match; +my $auth_match_quality_ratio; # deprecated options; these map to their bib_* equivalents my $import_no_match; @@ -118,10 +120,12 @@ GetOptions( 'bib-auto-overlay-exact' => \$bib_auto_overlay_exact, 'bib-auto-overlay-1match' => \$bib_auto_overlay_1match, 'bib-auto-overlay-best-match' => \$bib_auto_overlay_best_match, + 'bib-match-quality-ratio=f' => \$bib_match_quality_ratio, 'auth-import-no-match' => \$auth_import_no_match, 'auth-auto-overlay-exact' => \$auth_auto_overlay_exact, 'auth-auto-overlay-1match' => \$auth_auto_overlay_1match, 'auth-auto-overlay-best-match' => \$auth_auto_overlay_best_match, + 'auth-match-quality-ratio=f' => \$auth_match_quality_ratio, 'help' => \$help, 'net-server-config=s' => \$net_server_conf, 'port=i' => \$port @@ -189,10 +193,12 @@ sub usage { --bib-auto-overlay-exact --bib-auto-overlay-1match --bib-auto-overlay-best-match + --bib-match-quality-ratio --auth-import-no-match --auth-auto-overlay-exact --auth-auto-overlay-1match --auth-auto-overlay-best-match + --auth-match-quality-ratio Bib and auth import options which map directly to Vandelay import options. @@ -289,11 +295,13 @@ sub compile_vandelay_ops { $vl_ops->{auto_overlay_exact} = $auth_auto_overlay_exact; $vl_ops->{auto_overlay_1match} = $auth_auto_overlay_1match; $vl_ops->{auto_overlay_best_match} = $auth_auto_overlay_best_match; + $vl_ops->{match_quality_ratio} = $auth_match_quality_ratio; } else { $vl_ops->{import_no_match} = $bib_import_no_match; $vl_ops->{auto_overlay_exact} = $bib_auto_overlay_exact; $vl_ops->{auto_overlay_1match} = $bib_auto_overlay_1match; $vl_ops->{auto_overlay_best_match} = $bib_auto_overlay_best_match; + $vl_ops->{match_quality_ratio} = $bib_match_quality_ratio; } # Default to exact match only if not other strategy is selected. -- 2.11.0